Interface Tool

All Superinterfaces:
java.lang.Cloneable, IconObject, PopupMenuObject, ToolInputListener
All Known Subinterfaces:
QueryTool
All Known Implementing Classes:
DialogTool, Tool2D, Tool3D, ToolCreateEllipse2D, ToolCreateImage2D, ToolCreateImage3D, ToolCreateMeshFromPolylines, ToolCreatePolygon2D, ToolCreateRect2D, ToolCutMeshWithPlane, ToolDataSource, ToolDefine3DGrid2D, ToolDZoom2D, ToolGetConvexHull2D, ToolGetMeshIntersectionPolylines, ToolGraph, ToolGraphImage, ToolGraphTransform, ToolLayout2D, ToolMouseOrbit3D, ToolPan2D, ToolPlot, ToolQueryShape2D, ToolQueryShape3D, ToolReversePolygon2D, ToolRuler2D, ToolSelectMeshBoundaryNodes, ToolSelectNodesWithPolygon, ToolSelectRegionBoundaryNodes, ToolSelectShape2D, ToolSelectShape3D, ToolTestInternalPoint2D, ToolWindowZoom2D, ToolZoomExt2D

public interface Tool
extends java.lang.Cloneable, ToolInputListener, IconObject, PopupMenuObject
Interface for any class which performs an operation or set of operations on ModelGUI objects, which involves user interaction.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Method Details

    • getName

      java.lang.String getName()
    • clone

      java.lang.Object clone() throws java.lang.CloneNotSupportedException
      Throws:
      java.lang.CloneNotSupportedException
    • isImmediate

      boolean isImmediate()
      Specifies whether this tool is immediate; this indicates that it should be run immediately upon calling and stop, rather than wait for AWT events.
      Returns:
    • addListener

      void addListener​(ToolListener listener)
    • removeListener

      void removeListener​(ToolListener listener)
    • getPreviousTool

      Tool getPreviousTool()
      Returns the tool that was set previous to this one, if one exists
      Returns:
    • activate

      void activate()
      Should be called once a tool is activated within a particular InterfaceDisplayPanel.
    • deactivate

      void deactivate()
      Should be called once a tool is deactivated; instances of Tool should perform clean-up activities here.
    • isExclusive

      boolean isExclusive()
      Specifies whether this tool requires exclusively; otherwise it will run in parallel with the default tool, if one exists.
      Returns:
    • setTargetPanel

      void setTargetPanel​(InterfacePanel panel)