|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcdox.gui.undo.MoveAction
This is an action that represents a simple position change. It stores the source and destination points of the move and moves the element to the source position if undone and to the destination position if redone.
Constructor Summary | |
MoveAction(Element e,
java.awt.Point src,
java.awt.Point dest)
Makes a new MoveAction with the specified move. |
Method Summary | |
void |
invalidate()
This method invalidates the action, which typically means that the undo/redo methods do nothing. |
void |
redo()
Sets the position to the destination point. |
void |
undo()
Sets the position to the source point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MoveAction(Element e, java.awt.Point src, java.awt.Point dest)
e
- the element that has been moved.src
- the original position of the element.dest
- the target position of the element.Method Detail |
public void undo()
undo
in interface DoAction
public void redo()
redo
in interface DoAction
public void invalidate()
DoAction
invalidate
in interface DoAction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |