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 voidaddTool(Tool t)Adds the given tool to the mode.GraphConstraint[]getConstraints()Returns an array containing theGraphConstraints of the currentMode.StringgetId()Returns the name of this mode.List<Tool>getTools()Returns an array containing all the tools belongingMode.
-
Method Details
-
getConstraints
Returns an array containing theGraphConstraints of the currentMode.- Specified by:
getConstraintsin interfaceMode- Returns:
- an array containing the
GraphConstraints 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.
-