Module imp2d

Class EditTool

All Implemented Interfaces:
AWTDrawable, Transformation, Pickable, Manageable, PersistenceCapable, Shareable, Command, UserFields, XObject, Disposable, EventListener, Map, Serializable, EventListener

public class EditTool extends ToolRoot2D implements AWTDrawable, Pickable, Command
See Also:
  • Field Details

  • Constructor Details

    • EditTool

      public EditTool()
  • Method Details

    • getNTypeImpl

      protected Node.NType getNTypeImpl()
      Description copied from class: Node
      This method returns the Node.NType which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      getNTypeImpl in class Node
      Returns:
      type describing the managed fields of the class of this node
    • newInstance

      protected Node newInstance()
      Description copied from class: Node
      This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.
      Overrides:
      newInstance in class Node
      Returns:
      new instance of class of this node
    • getEditable

      public Editable getEditable()
    • getTool

      public Tool getTool()
    • getGraphState

      public GraphState getGraphState()
    • initialize

      protected boolean initialize(Tool tool)
      Description copied from class: ToolRoot
      Initializes this tool root. This method initializes the field ToolRoot.tool with the given tool.
      Overrides:
      initialize in class ToolRoot2D
      Parameters:
      tool - the tool to which this tool root is associated
      Returns:
      true if this tool root actually shall be used for the tool, false if it shall not be used (e.g., if the actual tool target cannot be manipulated by the tool graph of this tool root).
    • calculateTargetTransformation

      protected void calculateTargetTransformation(Matrix3d t, Matrix3d parent)
      Specified by:
      calculateTargetTransformation in class ToolRoot2D
    • eventOccured

      public void eventOccured(EventObject e)
      Description copied from interface: EventListener
      This method is invoked on registered event listeners when event has occured. This general listener interface does not restrict the possible kinds of events. Concrete sources of events should specify which events they may fire.
      Specified by:
      eventOccured in interface EventListener
      Overrides:
      eventOccured in class ToolRoot2D
      Parameters:
      e - an event
    • getCommandName

      public String getCommandName()
      Description copied from interface: Command
      Returns a name which can be used in the graphical user interface to represent this command.
      Specified by:
      getCommandName in interface Command
      Returns:
      this commands's name
    • run

      public void run(Object o, Context c)
      Description copied from interface: Command
      Performs the actions of this command. This method is invoked by the JobManager after the command has been submitted to the job manager by one of execute, runAt, or runLater-methods. The arguments info and context are the arguments which have been provided as arguments to the JobManager-methods.
      Specified by:
      run in interface Command
      Parameters:
      o - an argument
      c - a context
    • pick

      public void pick(Object object, boolean asNode, Point2d point, Matrix3d transformation, PickList list)
      Specified by:
      pick in interface Pickable
    • setPickId

      public void setPickId(int pickId)
    • getPickId

      public int getPickId()
    • setObject

      public void setObject(Object object)
    • getObject

      public Object getObject()
    • draw

      public void draw(Object object, boolean asNode, AWTCanvas2D canvas, Matrix3d transformation, int state)
      Specified by:
      draw in interface AWTDrawable
    • pickHandle

      public boolean pickHandle(Matrix3d transformation, PickList list, double x, double y, int id)
    • drawHandle

      public static void drawHandle(AWTCanvas2D c, Matrix3d t, double x, double y)
    • setTransform

      public void setTransform(Matrix3d t)