Package de.fu_berlin.inf.dpp.whiteboard.gef.commands

Examples of de.fu_berlin.inf.dpp.whiteboard.gef.commands.CopyRecordCommand


  private Command createCopyCommand(List selectedObjects) {
    if (selectedObjects == null || selectedObjects.isEmpty()) {
      return null;
    }

    CopyRecordCommand cmd = new CopyRecordCommand();
    Object o;
    Iterator it = selectedObjects.iterator();
    while (it.hasNext()) {
      o = it.next();
      if (!(o instanceof EditPart))
        continue;
      EditPart ep = (EditPart) o;
      LayoutElementRecord node = (LayoutElementRecord) ep.getModel();
      if (!cmd.isCopyableNode(node)) // TODO only copy others?
        return null;
      cmd.addElement(node);
    }
    return cmd;
  }
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.whiteboard.gef.commands.CopyRecordCommand

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.