Class MovingAnnotationCommand

  • All Implemented Interfaces:
    IUndoableCommand

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

      • beforeMovePosition

        private org.eclipse.draw2d.geometry.Point beforeMovePosition
      • afterMovePosition

        private org.eclipse.draw2d.geometry.Point afterMovePosition
      • beforeMoveSnappedSample

        private ISample beforeMoveSnappedSample
      • afterMoveSnappedSample

        private ISample afterMoveSnappedSample
      • beforeDx

        private double beforeDx
      • beforeDy

        private double beforeDy
      • afterDx

        private double afterDx
      • afterDy

        private double afterDy
    • Constructor Detail

      • MovingAnnotationCommand

        public MovingAnnotationCommand​(Annotation annotation)
    • Method Detail

      • 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