Examples of DiagramConnectionFigure


Examples of org.eclipse.sapphire.ui.swt.gef.figures.DiagramConnectionFigure

    installEditPolicy(EditPolicy.COMPONENT_ROLE, new DiagramConnectionEditPolicy());
  }

  @Override
  protected IFigure createFigure() {
    PolylineConnection connection = new DiagramConnectionFigure();
    IDiagramConnectionDef def = getCastedModel().getModelPart().getConnectionDef();
   
    ConnectionEndpointType type1 = ConnectionEndpointType.NONE;
    if (def.getEndpoint1() != null) {
      type1 = def.getEndpoint1().getType().content();
    }
    if (type1.equals(ConnectionEndpointType.ARROW)) {
      connection.setSourceDecoration(new PolygonDecoration());
    }
   
    ConnectionEndpointType type2 = ConnectionEndpointType.NONE;
    if (def.getEndpoint2() != null) {
      type2 = def.getEndpoint2().getType().content();
    }
    if (type2.equals(ConnectionEndpointType.ARROW)) {
      connection.setTargetDecoration(new PolygonDecoration());
    }

    updateStyle(connection);
    return connection;
  }
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.