Package org.eclipse.gef.requests

Examples of org.eclipse.gef.requests.CreateConnectionRequest


    return cmd;
  }

  private void identifySourceFigure(Request req) {
    if (req instanceof CreateConnectionRequest) {
      CreateConnectionRequest r = (CreateConnectionRequest) req;
      if (r.getSourceEditPart() instanceof AbstractGraphicalEditPart) {
        AbstractGraphicalEditPart ep = (AbstractGraphicalEditPart) r.getSourceEditPart();
        rec = ep.getFigure().getBounds();
      }
    } else {
      rec = null;
    }
View Full Code Here


  @Override
  protected void updateTargetRequest()
  {
    updateTargetUnderMouse();

    CreateConnectionRequest request = (CreateConnectionRequest) getTargetRequest();
    request.setType(getCommandName());   

    org.eclipse.draw2d.geometry.Point absoluteMousePosition = diagramEditor.getMouseLocation();
    request.setLocation(absoluteMousePosition);

  }
View Full Code Here

  }

  @Override
  public ConnectionAnchor getSourceConnectionAnchor(Request request) {
    if (request instanceof CreateConnectionRequest) {
      CreateConnectionRequest create = (CreateConnectionRequest) request;
      if (AlternateTransition.class == create.getNewObjectType()) {
        return getMappingConnectionAnchor();
      }
    }
    return super.getSourceConnectionAnchor(request);
  }
View Full Code Here

  }

  @Override
  public ConnectionAnchor getSourceConnectionAnchor(Request request) {
    if (request instanceof CreateConnectionRequest) {
      CreateConnectionRequest create = (CreateConnectionRequest) request;
      if (AlternateTransition.class == create.getNewObjectType()) {
        return getWireTapConnectionAnchor();
      }
    }
    return super.getSourceConnectionAnchor(request);
  }
View Full Code Here

  }

  @Override
  public ConnectionAnchor getSourceConnectionAnchor(Request request) {
    if (request instanceof CreateConnectionRequest) {
      CreateConnectionRequest create = (CreateConnectionRequest) request;
      if (AlternateTransition.class == create.getNewObjectType()) {
        return getRecipientConnectionAnchor();
      }
    }
    return super.getSourceConnectionAnchor(request);
  }
View Full Code Here

TOP

Related Classes of org.eclipse.gef.requests.CreateConnectionRequest

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.