java.lang.Object
ij.plugin.tool.PlugInTool
ij.plugin.tool.BrushTool
- All Implemented Interfaces:
PlugIn
,java.lang.Runnable
public class BrushTool extends PlugInTool implements java.lang.Runnable
This class implements the Paintbrush Tool, which allows the user to draw on
an image, or on an Overlay if "Paint on overlay" is enabled.
-
Constructor Summary
Constructors Constructor Description BrushTool()
-
Method Summary
Modifier and Type Method Description java.lang.String
getToolIcon()
Return the string encoding of the tool icon.java.lang.String
getToolName()
Return the tool name.void
mouseDragged(ImagePlus imp, java.awt.event.MouseEvent e)
void
mousePressed(ImagePlus imp, java.awt.event.MouseEvent e)
void
mouseReleased(ImagePlus imp, java.awt.event.MouseEvent e)
void
run()
void
run(java.lang.String arg)
This method is called when the plugin is loaded.static void
setBrushWidth(int width)
void
showOptionsDialog()
Methods inherited from class ij.plugin.tool.PlugInTool
getMacroProgram, mouseClicked, mouseEntered, mouseExited, mouseMoved, runMacroTool, runMenuTool, showPopupMenu
-
Constructor Details
-
BrushTool
public BrushTool()
-
-
Method Details
-
run
public void run(java.lang.String arg)Description copied from interface:PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.- Specified by:
run
in interfacePlugIn
- Overrides:
run
in classPlugInTool
-
mousePressed
- Overrides:
mousePressed
in classPlugInTool
-
mouseDragged
- Overrides:
mouseDragged
in classPlugInTool
-
mouseReleased
- Overrides:
mouseReleased
in classPlugInTool
-
showOptionsDialog
public void showOptionsDialog()- Overrides:
showOptionsDialog
in classPlugInTool
-
getToolName
public java.lang.String getToolName()Description copied from class:PlugInTool
Return the tool name.- Overrides:
getToolName
in classPlugInTool
-
getToolIcon
public java.lang.String getToolIcon()Description copied from class:PlugInTool
Return the string encoding of the tool icon. See http://rsb.info.nih.gov/ij/developer/macro/macros.html#icons The default icon is the first letter of the tool name.- Overrides:
getToolIcon
in classPlugInTool
-
run
public void run()- Specified by:
run
in interfacejava.lang.Runnable
-
setBrushWidth
public static void setBrushWidth(int width)
-