Package org.eclipse.draw2d

Examples of org.eclipse.draw2d.PolygonDecoration


    protected void applyResults(ElementConnectionEditPart connectionPart)    {
        Edge e = (Edge) partToNodesMap.get(connectionPart);
        NodeList nodes = e.vNodes;
        PolylineConnection conn = (PolylineConnection) connectionPart.getConnectionFigure();
        conn.setTargetDecoration(new PolygonDecoration());
        if (nodes != null) {
            List bends = new ArrayList();
            for (int i = 0; i < nodes.size(); i++) {
                Node vn = nodes.getNode(i);
                int x = vn.x;
View Full Code Here


    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

public static PolylineConnection createNewWire(Wire wire){

  PolylineConnection conn = new PolylineConnection();
  conn.addRoutingListener(RoutingAnimator.getDefault());
  PolygonDecoration arrow;
 
  if (wire == null || wire.getSource() instanceof SimpleOutput)
    arrow = null;
  else {
    arrow = new PolygonDecoration();
    arrow.setTemplate(PolygonDecoration.INVERTED_TRIANGLE_TIP);
    arrow.setScale(5,2.5);
  }
  conn.setSourceDecoration(arrow);
 
  if (wire == null || wire.getTarget() instanceof SimpleOutput)
    arrow = null;
  else {
    arrow = new PolygonDecoration();
    arrow.setTemplate(PolygonDecoration.INVERTED_TRIANGLE_TIP);
    arrow.setScale(5,2.5);
  }
  conn.setTargetDecoration(arrow);
  return conn;
}
View Full Code Here

          super.route(conn);
        }
      }
    });
    if (((Transition) getModel()).isDirectional()) {
      conn.setTargetDecoration(new PolygonDecoration());
    }
    conn.setLineStyle(((Transition) getModel()).getLineStyle());
    conn.setForegroundColor(ColorConstants.gray);
    conn.setLineWidth(2);
    return conn;
View Full Code Here

   * @param graph
   * @param map
   */
  protected void applyGraphResults(CompoundDirectedGraph graph, Map map) {
    conn = (PolylineConnection) getConnectionFigure();
    conn.setTargetDecoration(new PolygonDecoration());

  }
View Full Code Here

   *
   * @see org.eclipse.gef.editparts.AbstractConnectionEditPart#createFigure()
   */
  protected IFigure createFigure() {
    PolylineConnection conn = (PolylineConnection) super.createFigure();
    conn.setTargetDecoration(new PolygonDecoration());
    if (!getTransitionModel().isThen()) {
      conn.setLineStyle(Graphics.LINE_DASH);
      conn.setBackgroundColor(ColorConstants.lightGray);
      conn.setForegroundColor(ColorConstants.lightGray);
    }
View Full Code Here

    }

    conn.setToolTip(new Label(eLabelProvider.getText(getModel(), false,
        true, true)));

    conn.setTargetDecoration(new PolygonDecoration());
    return conn;
  }
View Full Code Here

   * @param graph
   * @param map
   */
  protected void applyGraphResults(CompoundDirectedGraph graph, Map map) {
    conn = (PolylineConnection) getConnectionFigure();
    conn.setTargetDecoration(new PolygonDecoration());
  }
View Full Code Here

TOP

Related Classes of org.eclipse.draw2d.PolygonDecoration

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.