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 GraphConstraint
s and a list of tools.-
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
GraphConstraint[] getConstraints()Returns an array containing theGraphConstraint
s of the currentMode
.- Returns:
- an array containing the
GraphConstraint
s 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.
-