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 doubleafterDxprivate doubleafterDyprivate org.eclipse.draw2d.geometry.PointafterMovePositionprivate ISampleafterMoveSnappedSampleprivate Annotationannotationprivate doublebeforeDxprivate doublebeforeDyprivate org.eclipse.draw2d.geometry.PointbeforeMovePositionprivate ISamplebeforeMoveSnappedSample
-
Constructor Summary
Constructors Constructor Description MovingAnnotationCommand(Annotation annotation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidredo()Restore the state of the target to the state after this command has been executed.voidsetAfterDxDy(double dx, double dy)voidsetAfterMovePosition(org.eclipse.draw2d.geometry.Point afterMovePosition)voidsetAfterMoveSnappedSample(ISample afterMoveSnappedSample)voidsetBeforeDxDy(double dx, double dy)voidsetBeforeMovePosition(org.eclipse.draw2d.geometry.Point beforeMovePosition)voidsetBeforeMoveSnappedSample(ISample beforeMoveSnappedSample)java.lang.StringtoString()voidundo()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:IUndoableCommandRestore the state of the target to the state after this command has been executed.- Specified by:
redoin interfaceIUndoableCommand
-
undo
public void undo()
Description copied from interface:IUndoableCommandRestore the state of the target to the state before this command has been executed.- Specified by:
undoin 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:
toStringin classjava.lang.Object
-
-