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