Package mgui.interfaces.tools
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 Summary
Modifier and Type Method Description void
activate()
Should be called once a tool is activated within a particular InterfaceDisplayPanel.void
addListener(ToolListener listener)
java.lang.Object
clone()
void
deactivate()
Should be called once a tool is deactivated; instances of Tool should perform clean-up activities here.java.lang.String
getName()
Tool
getPreviousTool()
Returns the tool that was set previous to this one, if one existsboolean
isExclusive()
Specifies whether this tool requires exclusively; otherwise it will run in parallel with the default tool, if one exists.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.void
removeListener(ToolListener listener)
void
setTargetPanel(InterfacePanel panel)
Methods inherited from interface mgui.resources.icons.IconObject
getObjectIcon
Methods inherited from interface mgui.interfaces.menus.PopupMenuObject
getPopupMenu, getPopupMenu, handlePopupEvent, showPopupMenu
Methods inherited from interface mgui.interfaces.tools.ToolInputListener
handleToolEvent
-
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
-
removeListener
-
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
-