Package org.graffiti.plugin.mode
Interface Mode
- All Known Implementing Classes:
AbstractMode,DefaultEditMode
public interface Mode
The interface
Mode describes a general mode in the editor. A
mode contains a list of GraphConstraints and a list of tools.-
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
GraphConstraint[] getConstraints()Returns an array containing theGraphConstraints of the currentMode.- Returns:
- an array containing the
GraphConstraints of the currentMode.
-
getId
String 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.- Returns:
- the name of this mode.
-
getTools
Returns an array containing all the tools belongingMode.- Returns:
- an array containing all the tools belonging
Mode.
-
addTool
Adds the given tool to the mode.- Parameters:
t- the tool to add.
-