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<Bendpoint> bends = new ArrayList<Bendpoint>();
            for (int i = 0; i < nodes.size(); i++) {
                Node vn = nodes.getNode(i);
                int x = vn.x;
View Full Code Here


    protected abstract ElementConnectionFactory getDefaultElementConnectionFactory();

    protected IFigure createFigure() {
        PolylineConnection result = new PolylineConnection();
        result.setConnectionRouter(new BendpointConnectionRouter());
        result.setTargetDecoration(new PolygonDecoration());
        return result;
    }
View Full Code Here

    IConnector connector = (IConnector) getModel();
    connectorFigure.setToolTip(connector.toString() + " : "+ connector.getCost());

    // sets end style
    PolygonDecoration polygonDecoration = new PolygonDecoration(); // End connection triangle decorator
    connectorFigure.setTargetDecoration(polygonDecoration);
    connectorFigure.setLineStyle(Graphics.LINE_SOLID);
    connectorFigure.setLineWidth(1);
   
    if (connector.isInCycle()) {
View Full Code Here

public class ConnectionPart extends AbstractConnectionEditPart {

  protected IFigure createFigure() {
    PolylineConnection connection = (PolylineConnection) super.createFigure();
    connection.setTargetDecoration(new PolygonDecoration());
    connection.setLineStyle(Graphics.LINE_SOLID);
    return connection;
  }
View Full Code Here

   * @param connection
   *            a GraphConnection
   */
  private static void drawDecompositionConnectionEnd(
      GraphConnection connection) {
    PolygonDecoration decoration = new PolygonDecoration();

    PointList decorationPointList = new PointList();
    decorationPointList.addPoint(0, 0);
    decorationPointList.addPoint(-1, 0);
    decorationPointList.addPoint(-1, -2);
    decorationPointList.addPoint(-1, +2);
    decorationPointList.addPoint(-1, 0);
    decoration.setTemplate(decorationPointList);

    ((PolylineConnection) connection.getConnectionFigure())
        .setTargetDecoration(decoration);

  }
View Full Code Here

    Boolean directed = (Boolean) edge.getType().getAttribute(
        ObjectType.ATTRIBUTE_DIRECTED);
    if (directed == null || directed) {
      // we consider the edge directed by default.
      setTargetDecoration(new PolygonDecoration());
    }

    Color color = (Color) edge.getType().getAttribute(
        ObjectType.ATTRIBUTE_COLOR);
    if (color == null) {
View Full Code Here

        label = new Label();
        ConnectionEndpointLocator locator = new ConnectionEndpointLocator(this, false);
        locator.setUDistance(10);
        add(label, locator);

        PolygonDecoration arrow = new PolygonDecoration();
        arrow.setTemplate(PolygonDecoration.TRIANGLE_TIP);
        arrow.setScale(5, 2.5);
        setTargetDecoration(arrow);
        setConnectionRouter(new ReferencedBendpointConnectionRouter());
        setRoutingConstraint(new ArrayList<Bendpoint>());
       
        if (bpmnNotation) {
View Full Code Here

  }
 
  public LabelArrowConnection(Color color){
    add(label, new ConnectionLocator(this, ConnectionLocator.MIDDLE));
    setConnectionRouter(new BendpointConnectionRouter());
    setTargetDecoration(new PolygonDecoration());
    if(color!=null){
      setForegroundColor(color);
    }
  }
View Full Code Here

     *
     * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure()
     */
    protected IFigure createFigure() {
        PolylineConnection connection = (PolylineConnection) super.createFigure();
        connection.setTargetDecoration(new PolygonDecoration()); // arrow at
                                                                 // target
                                                                 // endpoint
        connection.setLineStyle(getCastedModel().getLineStyle()); // line
                                                                  // drawing
                                                                  // style
View Full Code Here

    protected abstract ElementConnectionFactory getDefaultElementConnectionFactory();

    protected IFigure createFigure() {
        PolylineConnection result = new PolylineConnection();
        result.setConnectionRouter(new BendpointConnectionRouter());
        result.setTargetDecoration(new PolygonDecoration());
        return result;
    }
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.