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.
-
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 interfaceIUndoableCommand
-
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 interfaceIUndoableCommand
-
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
- Parameters:
beforeMoveSnappedSample
- the beforeMoveSnappedSample to set
-
setAfterMoveSnappedSample
- Parameters:
afterMoveSnappedSample
- the afterMoveSnappedSample to set
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-