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.
-
-
Field Summary
Fields Modifier and Type Field Description private double
afterDx
private double
afterDy
private org.eclipse.draw2d.geometry.Point
afterMovePosition
private ISample
afterMoveSnappedSample
private Annotation
annotation
private double
beforeDx
private double
beforeDy
private org.eclipse.draw2d.geometry.Point
beforeMovePosition
private ISample
beforeMoveSnappedSample
-
Constructor Summary
Constructors Constructor Description MovingAnnotationCommand(Annotation annotation)
-
Method Summary
All Methods Instance Methods Concrete Methods 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.
-
-
-
Field Detail
-
annotation
private Annotation annotation
-
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 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
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 classjava.lang.Object
-
-