Examples of ChsCompoundCommand


Examples of org.gvt.command.ChsCompoundCommand

    super(sourceEditPart);
  }

  protected Command getCommand()
  {
    ChsCompoundCommand command = new ChsCompoundCommand();
    command.setDebugLabel("Drag Object Tracker");

    Iterator iter = getOperationSet().iterator();

    Request request = getTargetRequest();

    if (isCloneActive())
    {
      request.setType(REQ_CLONE);
    }
    else if (isMove())
    {
      request.setType(REQ_MOVE);
    }
    else
    {
      request.setType(REQ_ORPHAN);
    }

    if (!isCloneActive())
    {
      while (iter.hasNext())
      {
        EditPart editPart = (EditPart)iter.next();
        command.add(editPart.getCommand(request));
      }
    }

    /*OK*/
    if (ChisioMain.transferNode)
    {
      if (!isMove() || isCloneActive())
      {
        if (!isCloneActive())
        {
          request.setType(REQ_ADD);
        }

        if (getTargetEditPart() == null)
        {
          command.add(UnexecutableCommand.INSTANCE);
        }
        else
        {
          command.add(
            getTargetEditPart().getCommand(getTargetRequest()));
        }
      }
    }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.