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 voidactivate()Should be called once a tool is activated within a particular InterfaceDisplayPanel.voidaddListener(ToolListener listener)java.lang.Objectclone()voiddeactivate()Should be called once a tool is deactivated; instances of Tool should perform clean-up activities here.java.lang.StringgetName()ToolgetPreviousTool()Returns the tool that was set previous to this one, if one existsbooleanisExclusive()Specifies whether this tool requires exclusively; otherwise it will run in parallel with the default tool, if one exists.booleanisImmediate()Specifies whether this tool is immediate; this indicates that it should be run immediately upon calling and stop, rather than wait for AWT events.voidremoveListener(ToolListener listener)voidsetTargetPanel(InterfacePanel panel)Methods inherited from interface mgui.resources.icons.IconObject
getObjectIconMethods inherited from interface mgui.interfaces.menus.PopupMenuObject
getPopupMenu, getPopupMenu, handlePopupEvent, showPopupMenuMethods 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
-