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 voidactivate()Called when the tool is activated.voiddeactivate()Resets the state of the tool.voiddeactivateAll()StringgetToolName()booleanisActive()Returns true if the tool is active.booleanisSelectionListener()States whether this class wants to be registered as aSelectionListener.booleanisSessionListener()States whether this class wants to be registered as aSessionListener.booleanisViewListener()States whether this class wants to be registered as aViewListener, i.e.voidpostProcessImageCreation()voidpreProcessImageCreation()voidsetGraph(Graph g)Sets the graph this tool works on.voidsetPrefs(Preferences p)Sets the preferences of this tool.Methods inherited from interface java.awt.event.MouseListener
mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleasedMethods 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. ImplementSessionListenerif 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()
-