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

Method getToolId

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

Returns the ID of the current tool (Toolbar.RECTANGLE, Toolbar.OVAL, etc.).

()

Source from the content-addressed store, hash-verified

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. */

Callers 15

createNewRoiMethod · 0.95
restoreRoiMethod · 0.95
keyPressedMethod · 0.95
getFunctionValueMethod · 0.95
mousePressedMethod · 0.95
addSelectionMethod · 0.95
installMethod · 0.95
mouseClickedMethod · 0.95
mousePressedMethod · 0.95
mouseReleasedMethod · 0.95
mousePressedMethod · 0.95
addRoiToOverlayMethod · 0.95

Calls 2

getNumToolsMethod · 0.95
startsWithMethod · 0.80

Tested by

no test coverage detected