Package net.sf.graphiti.ui.commands

Examples of net.sf.graphiti.ui.commands.DeleteCommand


*/
public class DependencyEditPolicy extends ConnectionEditPolicy {

  @Override
  protected Command getDeleteCommand(GroupRequest request) {
    DeleteCommand command = new DeleteCommand(getHost().getModel());
    return command;
  }
View Full Code Here


      List<?> incoming = part.getSourceConnections();
      List<?> outgoing = part.getTargetConnections();
      if (!incoming.isEmpty() || !outgoing.isEmpty()) {
        CompoundCommand compound = new CompoundCommand();
        for (Object obj : incoming) {
          DeleteCommand command = new DeleteCommand(
              ((EdgeEditPart) obj).getModel());
          compound.add(command);
        }

        for (Object obj : outgoing) {
          DeleteCommand command = new DeleteCommand(
              ((EdgeEditPart) obj).getModel());
          compound.add(command);
        }

        DeleteCommand command = new DeleteCommand(getHost().getModel());
        compound.add(command);

        return compound;
      }
    }

    DeleteCommand command = new DeleteCommand(getHost().getModel());
    return command;
  }
View Full Code Here

TOP

Related Classes of net.sf.graphiti.ui.commands.DeleteCommand

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.