MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / getName

Method getName

ij/src/main/java/ij/gui/Toolbar.java:851–880  ·  view source on GitHub ↗

Returns the name of the specified tool.

(int id)

Source from the content-addressed store, hash-verified

849
850 /** Returns the name of the specified tool. */
851 String getName(int id) {
852 switch (id) {
853 case RECTANGLE:
854 switch (rectType) {
855 case RECT_ROI: return "rectangle";
856 case ROUNDED_RECT_ROI: return "roundrect";
857 case ROTATED_RECT_ROI: return "rotrect";
858 }
859 case OVAL:
860 switch (ovalType) {
861 case OVAL_ROI: return "oval";
862 case ELLIPSE_ROI: return "ellipse";
863 case BRUSH_ROI: return "brush";
864 }
865 case POLYGON: return "polygon";
866 case FREEROI: return "freehand";
867 case LINE: return arrowMode?"arrow":"line";
868 case POLYLINE: return "polyline";
869 case FREELINE: return "freeline";
870 case ANGLE: return "angle";
871 case POINT: return Prefs.multiPointMode?"multipoint":"point";
872 case WAND: return "wand";
873 case TEXT: return "text";
874 case HAND: return "hand";
875 case MAGNIFIER: return "zoom";
876 case DROPPER: return "dropper";
877 default: return null;
878 }
879
880 }
881
882 public void setTool(int tool) {
883 if (tool==UNUSED) // "Unused" (blank) tool replaced with gap in 1.48h

Callers 1

setTool2Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected