01: // The UMLet source code is distributed under the terms of the GPL; see license.txt
02: //Class by A.Mueller Oct.05
03:
04: package com.umlet.control;
05:
06: import com.umlet.element.base.*;
07:
08: import java.util.Vector;
09:
10: public class Ungroup extends Command {
11: Group _group;
12:
13: public Ungroup(Group group) {
14: _group = group;
15: }
16:
17: public void execute() {
18: super .execute();
19: _group.ungroup();
20: }
21:
22: public void undo() {
23: super .undo();
24: Selector.getInstance().deselectAll();
25: Vector<Entity> temp = _group.getMembers();
26: for (int i = 0; i < temp.size(); i++) {
27: Selector.getInstance().selectXXX(temp.get(i));
28: }
29: _group = new Group();
30: _group.groupSelected();
31: }
32: }
|