Package org.graffiti.plugin.mode
Class AbstractMode
java.lang.Object
org.graffiti.plugin.mode.AbstractMode
- All Implemented Interfaces:
Mode
- Direct Known Subclasses:
DefaultEditMode
public class AbstractMode extends Object implements Mode
This class provides a skeletal implementation of the interface
Mode
.- See Also:
Mode
-
Method Summary
Modifier and Type Method Description void
addTool(Tool t)
Adds the given tool to the mode.GraphConstraint[]
getConstraints()
Returns an array containing theGraphConstraint
s of the currentMode
.String
getId()
Returns the name of this mode.List<Tool>
getTools()
Returns an array containing all the tools belongingMode
.
-
Method Details
-
getConstraints
Returns an array containing theGraphConstraint
s of the currentMode
.- Specified by:
getConstraints
in interfaceMode
- Returns:
- an array containing the
GraphConstraint
s of the currentMode
.
-
getId
Returns the name of this mode. Tools can be added to a mode by adding their ToolButtons to the toolbar with the same name as this mode. -
getTools
Returns an array containing all the tools belongingMode
. -
addTool
Adds the given tool to the mode.
-