Package org.eclipse.gef.examples.logicdesigner.model

Examples of org.eclipse.gef.examples.logicdesigner.model.LogicSubpart


  newConnections = new LinkedList();
  newTopLevelParts = new LinkedList();

  Iterator i = parts.iterator();
 
  LogicSubpart part = null;
  while (i.hasNext()) {
    part = (LogicSubpart)i.next();
    if (bounds != null && bounds.containsKey(part)) {
      clonePart(part, parent, (Rectangle)bounds.get(part),
          newConnections, connectionPartMap, -1)
    } else if (indices != null && indices.containsKey(part)) {
      clonePart(part, parent, null, newConnections,
          connectionPartMap, ((Integer)indices.get(part)).intValue());
    } else {
      clonePart(part, parent, null, newConnections, connectionPartMap, -1);
    }
  }
 
  // go through and set the source of each connection to the proper source.
  Iterator c = newConnections.iterator();
 
  while (c.hasNext()) {
    Wire conn = (Wire)c.next();
    LogicSubpart source = conn.getSource();
    if (connectionPartMap.containsKey(source)) {
      conn.setSource((LogicSubpart)connectionPartMap.get(source));
      conn.attachSource();
      conn.attachTarget();
    }
View Full Code Here


public void redo() {
  for (Iterator iter = newTopLevelParts.iterator(); iter.hasNext();)
    parent.addChild((LogicSubpart)iter.next());
  for (Iterator iter = newConnections.iterator(); iter.hasNext();) {
    Wire conn = (Wire) iter.next();
    LogicSubpart source = conn.getSource();
    if (connectionPartMap.containsKey(source)) {
      conn.setSource((LogicSubpart)connectionPartMap.get(source));
      conn.attachSource();
      conn.attachTarget();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.gef.examples.logicdesigner.model.LogicSubpart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.