Package org.graffiti.plugin.tool
Interface Tool
- All Superinterfaces:
EventListener
,MouseInputListener
,MouseListener
,MouseMotionListener
- All Known Implementing Classes:
AbstractTool
,AbstractUndoableTool
,AdvancedLabelTool
,IPK_AdvancedLabelTool
,IPK_MegaCreateTool
,IPK_MegaMoveTool
,LabelTool
,MegaCreateTool
,MegaMoveTool
,MegaTools
public interface Tool extends MouseInputListener
A
Tool
executes a specified action on a
ConstrainedGraph
.- See Also:
MouseInputListener
-
Method Summary
Modifier and Type Method Description void
activate()
Called when the tool is activated.void
deactivate()
Resets the state of the tool.void
deactivateAll()
String
getToolName()
boolean
isActive()
Returns true if the tool is active.boolean
isSelectionListener()
States whether this class wants to be registered as aSelectionListener
.boolean
isSessionListener()
States whether this class wants to be registered as aSessionListener
.boolean
isViewListener()
States whether this class wants to be registered as aViewListener
, i.e.void
postProcessImageCreation()
void
preProcessImageCreation()
void
setGraph(Graph g)
Sets the graph this tool works on.void
setPrefs(Preferences p)
Sets the preferences of this tool.Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased
Methods inherited from interface java.awt.event.MouseMotionListener
mouseDragged, mouseMoved
-
Method Details
-
isActive
boolean isActive()Returns true if the tool is active.- Returns:
- DOCUMENT ME!
-
isSelectionListener
boolean isSelectionListener()States whether this class wants to be registered as aSelectionListener
.- Returns:
- DOCUMENT ME!
-
isSessionListener
boolean isSessionListener()States whether this class wants to be registered as aSessionListener
.- Returns:
- DOCUMENT ME!
-
isViewListener
boolean isViewListener()States whether this class wants to be registered as aViewListener
, i.e. if it wants to get informed when another view in the same session becomes active. This method is not called when another session is activated. ImplementSessionListener
if you are interested in session changed events.- Returns:
- DOCUMENT ME!
-
activate
void activate()Called when the tool is activated. -
deactivate
void deactivate()Resets the state of the tool. Called when another tool is activated. -
setGraph
Sets the graph this tool works on.- Parameters:
g
- the graph this tool should work on.
-
setPrefs
Sets the preferences of this tool.- Parameters:
p
- the preferences of this tool.
-
deactivateAll
void deactivateAll() -
preProcessImageCreation
void preProcessImageCreation() -
postProcessImageCreation
void postProcessImageCreation() -
getToolName
String getToolName()
-