Class MovingAnnotationCommand

java.lang.Object
org.eclipse.nebula.visualization.internal.xygraph.undo.MovingAnnotationCommand
All Implemented Interfaces:
IUndoableCommand

public class MovingAnnotationCommand
extends java.lang.Object
implements IUndoableCommand
The command of moving an annotation on the graph.
  • Constructor Summary

    Constructors 
    Constructor Description
    MovingAnnotationCommand​(Annotation annotation)  
  • Method Summary

    Modifier and Type Method Description
    void redo()
    Restore the state of the target to the state after this command has been executed.
    void setAfterDxDy​(double dx, double dy)  
    void setAfterMovePosition​(org.eclipse.draw2d.geometry.Point afterMovePosition)  
    void setAfterMoveSnappedSample​(ISample afterMoveSnappedSample)  
    void setBeforeDxDy​(double dx, double dy)  
    void setBeforeMovePosition​(org.eclipse.draw2d.geometry.Point beforeMovePosition)  
    void setBeforeMoveSnappedSample​(ISample beforeMoveSnappedSample)  
    java.lang.String toString()  
    void undo()
    Restore the state of the target to the state before this command has been executed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • redo

      public void redo()
      Description copied from interface: IUndoableCommand
      Restore the state of the target to the state after this command has been executed.
      Specified by:
      redo in interface IUndoableCommand
    • undo

      public void undo()
      Description copied from interface: IUndoableCommand
      Restore the state of the target to the state before this command has been executed.
      Specified by:
      undo in interface IUndoableCommand
    • setBeforeDxDy

      public void setBeforeDxDy​(double dx, double dy)
    • setAfterDxDy

      public void setAfterDxDy​(double dx, double dy)
    • setBeforeMovePosition

      public void setBeforeMovePosition​(org.eclipse.draw2d.geometry.Point beforeMovePosition)
      Parameters:
      beforeMovePosition - the beforeMovePosition to set
    • setAfterMovePosition

      public void setAfterMovePosition​(org.eclipse.draw2d.geometry.Point afterMovePosition)
      Parameters:
      afterMovePosition - the afterMovePosition to set
    • setBeforeMoveSnappedSample

      public void setBeforeMoveSnappedSample​(ISample beforeMoveSnappedSample)
      Parameters:
      beforeMoveSnappedSample - the beforeMoveSnappedSample to set
    • setAfterMoveSnappedSample

      public void setAfterMoveSnappedSample​(ISample afterMoveSnappedSample)
      Parameters:
      afterMoveSnappedSample - the afterMoveSnappedSample to set
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object