Exemplo n.º 1
0
 @Override
 public void execute() {
   fOldPos =
       fOldParent
           .getElements()
           .indexOf(fElement); // do this here as its part of a compound command
   redo();
 }
Exemplo n.º 2
0
 @Override
 public void redo() {
   fOldParent.getElements().remove(fElement);
   fNewParent.getElements().add(fElement);
 }
Exemplo n.º 3
0
 @Override
 public void undo() {
   fNewParent.getElements().remove(fElement);
   fOldParent.getElements().add(fOldPos, fElement);
 }