Returns the ID of the current tool (Toolbar.RECTANGLE, Toolbar.OVAL, etc.).
()
| 288 | |
| 289 | /** Returns the ID of the current tool (Toolbar.RECTANGLE, Toolbar.OVAL, etc.). */ |
| 290 | public static int getToolId() { |
| 291 | int id = current; |
| 292 | if (legacyMode) { |
| 293 | if (id==CUSTOM1) |
| 294 | id=UNUSED; |
| 295 | else if (id>=CUSTOM2) |
| 296 | id--; |
| 297 | } |
| 298 | return id; |
| 299 | } |
| 300 | |
| 301 | /** Returns the ID of the tool whose name (the description displayed in the status bar) |
| 302 | starts with the specified string, or -1 if the tool is not found. */ |
no test coverage detected