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