Module ij
Package ij.plugin.tool

# Class BrushTool

java.lang.Object
ij.plugin.tool.PlugInTool
ij.plugin.tool.BrushTool

All Implemented Interfaces:
  `PlugIn`, `Runnable`

public class BrushTool extends PlugInTool implements 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
`String`
`getToolIcon()`
Return the string encoding of the tool icon.
`String`
`getToolName()`
Return the tool name.
`void`
`mouseDragged(ImagePlus imp, MouseEvent e)`
`void`
`mousePressed(ImagePlus imp, MouseEvent e)`
`void`
`mouseReleased(ImagePlus imp, MouseEvent e)`
`void`
`run()`
`void`
`run(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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BrushTool

public BrushTool()

## Method Details

### run

public void run(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 interface `PlugIn`
Overrides:
  `run` in class `PlugInTool`

### mousePressed

public void mousePressed(ImagePlus imp, MouseEvent e)

Overrides:
  `mousePressed` in class `PlugInTool`

### mouseDragged

public void mouseDragged(ImagePlus imp, MouseEvent e)

Overrides:
  `mouseDragged` in class `PlugInTool`

### mouseReleased

public void mouseReleased(ImagePlus imp, MouseEvent e)

Overrides:
  `mouseReleased` in class `PlugInTool`

### showOptionsDialog

public void showOptionsDialog()

Overrides:
  `showOptionsDialog` in class `PlugInTool`

### getToolName

public String getToolName()
Description copied from class: `PlugInTool`
Return the tool name.

Overrides:
  `getToolName` in class `PlugInTool`

### getToolIcon

public 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 class `PlugInTool`

### run

public void run()

Specified by:
  `run` in interface `Runnable`

### setBrushWidth

public static void setBrushWidth(int width)