Interface Tool
-
- All Superinterfaces:
CleanUpHandler
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,Serializable
- All Known Subinterfaces:
CustomizableTool
- All Known Implementing Classes:
AbstractTool
,AbstractToolWithParameterPanel
,Annotator
,Edit
,Move
public interface Tool extends Serializable, GlobalInfoSupporter, CleanUpHandler, LoggingSupporter, LoggingLevelHandler
Interface for tools.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activate()
Gets called to activate the tool.void
deactivate()
Gets called to deactivate the tool.CanvasPanel
getCanvas()
Returns the currently set canvas panel.Cursor
getCursor()
Returns the mouse cursor to use.Icon
getIcon()
The icon of the tool.BufferedImage
getImage()
Returns the current image.ToolKeyAdapter
getKeyListener()
Returns the mouse listener to use.ToolMouseAdapter
getMouseListener()
Returns the mouse listener to use.ToolMouseMotionAdapter
getMouseMotionListener()
Returns the mouse motion listener to use.String
getName()
The name of the tool.BasePanel
getOptionPanel()
Returns the panel for setting the options.double
getZoom()
Returns the current zoom.boolean
hasImage()
Checks whether an image is currently available.boolean
isModified()
Returns whether the settings are currently modified.void
setCanvas(CanvasPanel value)
Sets the panel to use.void
update()
Called when image or annotations change.-
Methods inherited from interface adams.core.CleanUpHandler
cleanUp
-
Methods inherited from interface adams.core.GlobalInfoSupporter
globalInfo
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
-
-
-
Method Detail
-
setCanvas
void setCanvas(CanvasPanel value)
Sets the panel to use.- Parameters:
value
- the panel
-
getCanvas
CanvasPanel getCanvas()
Returns the currently set canvas panel.- Returns:
- the panel, null if none set
-
hasImage
boolean hasImage()
Checks whether an image is currently available.- Returns:
- true if available
-
getImage
BufferedImage getImage()
Returns the current image.- Returns:
- the image or null if none available
-
getZoom
double getZoom()
Returns the current zoom.- Returns:
- the zoom (1.0 = 100%)
-
getName
String getName()
The name of the tool.- Returns:
- the name
-
getIcon
Icon getIcon()
The icon of the tool.- Returns:
- the icon
-
getCursor
Cursor getCursor()
Returns the mouse cursor to use.- Returns:
- the cursor
-
getMouseListener
ToolMouseAdapter getMouseListener()
Returns the mouse listener to use.- Returns:
- the listener
-
getMouseMotionListener
ToolMouseMotionAdapter getMouseMotionListener()
Returns the mouse motion listener to use.- Returns:
- the listener
-
getKeyListener
ToolKeyAdapter getKeyListener()
Returns the mouse listener to use.- Returns:
- the listener
-
isModified
boolean isModified()
Returns whether the settings are currently modified.- Returns:
- true if modified
-
getOptionPanel
BasePanel getOptionPanel()
Returns the panel for setting the options.- Returns:
- the options panel
-
activate
void activate()
Gets called to activate the tool.
-
deactivate
void deactivate()
Gets called to deactivate the tool.
-
update
void update()
Called when image or annotations change.
-
-