Ungroup.java :  » UML » umlet » com » umlet » control » Java Open Source

Java Open Source » UML » umlet 
umlet » com » umlet » control » Ungroup.java
// The UMLet source code is distributed under the terms of the GPL; see license.txt
//Class by A.Mueller Oct.05

package com.umlet.control;

import com.umlet.element.base.*;

import java.util.Vector;


public class Ungroup extends Command {
  Group _group;

  public Ungroup(Group group) {
    _group = group;
  }

  public void execute() {
    super.execute();
    _group.ungroup();
  }

  public void undo() {
    super.undo();
    Selector.getInstance().deselectAll();
    Vector<Entity> temp = _group.getMembers();
    for (int i=0; i<temp.size(); i++)
    {
      Selector.getInstance().selectXXX(temp.get(i));
    }
    _group = new Group();
    _group.groupSelected();
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.