Package org.eclipse.gef

Examples of org.eclipse.gef.ConnectionEditPart


public class ChsBendpointEditPolicy extends BendpointEditPolicy
{
  protected List createSelectionHandles()
  {
    List<ConnectionBendpointHandle> list = new ArrayList<ConnectionBendpointHandle>();
    ConnectionEditPart connEP = (ConnectionEditPart) getHost();
    PointList points = getConnection().getPoints();
    List<Bendpoint> bendPoints = (List<Bendpoint>) getConnection().getRoutingConstraint();
    int bendPointIndex = 0;
    Point currBendPoint = null;
View Full Code Here


  private static final List NULL_CONSTRAINT = new ArrayList();

  private Map<Shape, Integer> shapeToLineStyle = new HashMap<Shape, Integer>();

  protected Command getCreateBendpointCommand(BendpointRequest request) {
    ConnectionEditPart connectionEditPart = (ConnectionEditPart)getHost();
    if (connectionEditPart.getSource() == connectionEditPart.getTarget())
    {
      return null;
    }
    CreateBendPointCommand com = new CreateBendPointCommand();
    Point p = request.getLocation();
View Full Code Here

    com.setIndex(request.getIndex());
    return com;
  }

  protected Command getMoveBendpointCommand(BendpointRequest request) {
    ConnectionEditPart connectionEditPart = (ConnectionEditPart)getHost();
    if (connectionEditPart.getSource() == connectionEditPart.getTarget())
    {
      return null;
    }
    MoveBendPointCommand com = new MoveBendPointCommand();
    Point p = request.getLocation();
View Full Code Here

    com.setIndex(request.getIndex());
    return com;
  }

  protected Command getDeleteBendpointCommand(BendpointRequest request) {
    ConnectionEditPart connectionEditPart = (ConnectionEditPart)getHost();
    if (connectionEditPart.getSource() == connectionEditPart.getTarget())
    {
      return null;
    }
    BendPointCommand com = new DeleteBendPointCommand();
    Point p = request.getLocation();
View Full Code Here

  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  @Override
  protected List createSelectionHandles() {
    ConnectionEditPart connectionEditPart = (ConnectionEditPart)getHost();
    if (connectionEditPart.getSource() == connectionEditPart.getTarget())
    {
      return Collections.EMPTY_LIST;
    }
    List<BendpointHandle> list;
    boolean automaticallyBending = isAutomaticallyBending();
View Full Code Here

  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private List createHandlesForAutomaticBendpoints() {
    List list = new ArrayList();
    ConnectionEditPart connEP = (ConnectionEditPart) getHost();
    PointList points = getConnection().getPoints();
    for (int i = 0; i < points.size() - 1; i++)
      list.add(new DiagramBendpointCreationHandle(connEP, 0, i));

    return list;
View Full Code Here

  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private List createHandlesForUserBendpoints() {
    List list = new ArrayList();
    ConnectionEditPart connEP = (ConnectionEditPart) getHost();
    PointList points = getConnection().getPoints();
    List bendPoints = (List) getConnection().getRoutingConstraint();
    int bendPointIndex = 0;
    Point currBendPoint = null;
View Full Code Here

TOP

Related Classes of org.eclipse.gef.ConnectionEditPart

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.