Returns the name of the specified tool.
(int id)
| 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 |