|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.rej.gui.action.GroupAction
public class GroupAction
Utility class to group to Undoable objects together. This GroupAction
can
then be added into the Undo stack, causing the two or more grouped actions to
always execute/get undone at the same time.
A group of Undoable
objects A, B and C will always be executed in the order:
A
B
C
And always undone in the order:
C
B
A
Constructor Summary | |
---|---|
GroupAction()
|
Method Summary | |
---|---|
void |
add(Undoable action)
|
void |
execute()
Execute the command/action that fulfills the Undoable contract. |
boolean |
isEmpty()
|
void |
undo()
Undo all the changes caused by a call to the execute() method of this instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroupAction()
Method Detail |
---|
public void add(Undoable action)
public void execute()
Undoable
execute
in interface Undoable
public void undo()
Undoable
undo
in interface Undoable
public boolean isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |