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
    void addTool​(Tool t)
    Adds the given tool to the mode.
    GraphConstraint[] getConstraints()
    Returns an array containing the GraphConstraints of the current Mode.
    String getId()
    Returns the name of this mode.
    List<Tool> getTools()
    Returns an array containing all the tools belonging Mode.
  • Method Details

    • getConstraints

      GraphConstraint[] getConstraints()
      Returns an array containing the GraphConstraints of the current Mode.
      Returns:
      an array containing the GraphConstraints of the current Mode.
    • 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

      List<Tool> getTools()
      Returns an array containing all the tools belonging Mode.
      Returns:
      an array containing all the tools belonging Mode.
    • addTool

      void addTool​(Tool t)
      Adds the given tool to the mode.
      Parameters:
      t - the tool to add.