Exemplo n.º 1
0
 @Override
 public void undo() throws CannotUndoException {
   super.undo();
   upperModel.remove(moved);
   moved.setParent(lowerModel.getOwner());
   lowerModel.add(moved);
 }
Exemplo n.º 2
0
 @Override
 public void redo() throws CannotRedoException {
   super.redo();
   lowerModel.remove(moved);
   GroupLayer gl = lowerModel.getOwner();
   int i = upperModel.list().indexOf(gl);
   moved.setParent(upperModel.getOwner());
   upperModel.add(i, moved);
 }