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 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 a SelectionListener.
      Returns:
      DOCUMENT ME!
    • isSessionListener

      boolean isSessionListener()
      States whether this class wants to be registered as a SessionListener.
      Returns:
      DOCUMENT ME!
    • isViewListener

      boolean isViewListener()
      States whether this class wants to be registered as a ViewListener, 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. Implement SessionListener 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

      void setGraph​(Graph g)
      Sets the graph this tool works on.
      Parameters:
      g - the graph this tool should work on.
    • setPrefs

      void setPrefs​(Preferences p)
      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()