Module imp2d

Class ToolRoot2D

All Implemented Interfaces:
Transformation, Manageable, PersistenceCapable, Shareable, UserFields, XObject, Disposable, EventListener, Map, Serializable, EventListener
Direct Known Subclasses:
EditTool

public abstract class ToolRoot2D extends ToolRoot implements Transformation, EventListener
See Also:
  • Field Details

  • Constructor Details

    • ToolRoot2D

      public ToolRoot2D()
  • Method Details

    • 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 ToolRoot
      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).
    • dispose

      public void dispose()
      Specified by:
      dispose in interface Disposable
    • 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
      Parameters:
      e - an event
    • attributeChanged

      protected void attributeChanged(Attribute[] a)
      Description copied from class: ToolRoot
      This method is invoked to notify the tool root about modifications of attributes of the tool target.
      Specified by:
      attributeChanged in class ToolRoot
      Parameters:
      a - an array of attributes which have changed
    • preTransform

      public void preTransform(Object object, boolean asNode, Matrix3d in, Matrix3d out, GraphState gs)
      Specified by:
      preTransform in interface Transformation
    • postTransform

      public void postTransform(Object object, boolean asNode, Matrix3d in, Matrix3d out, Matrix3d pre, GraphState gs)
      Specified by:
      postTransform in interface Transformation
    • getParentTransformation

      public final Matrix3d getParentTransformation()
    • getTargetTransformation

      public final Matrix3d getTargetTransformation()
    • calculateTargetTransformation

      protected abstract void calculateTargetTransformation(Matrix3d t, Matrix3d parent)