Package org.eclipse.graphiti.mm.algorithms

Examples of org.eclipse.graphiti.mm.algorithms.Polygon


    ContainerShape container = peService.createContainerShape(context.getTargetContainer(), true);
    Rectangle invisibleRect = gaService.createInvisibleRectangle(container);
    gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height + textArea);

    Shape rectShape = peService.createShape(container, false);
    Polygon rect = gaService.createPolygon(rectShape, new int[] { 0, 0, width - e, 0, width, e, width, height, 0,
        height });
    rect.setLineWidth(1);
    StyleUtil.applyBGStyle(rect, this);
    decorate(rect);

    int p = width - e - 1;
    Polyline edge = gaService.createPolyline(rect, new int[] { p, 0, p, e + 1, width, e + 1 });
View Full Code Here


    return gaService.createPolygon(container, GATEWAY);
  }

  public static Polygon createGatewayPentagon(ContainerShape container) {
    Shape pentagonShape = peService.createShape(container, false);
    Polygon pentagon = gaService.createPolygon(pentagonShape, new int[] { GATEWAY_RADIUS, 18, GATEWAY_RADIUS + 8,
            GATEWAY_RADIUS - 2, GATEWAY_RADIUS + 5, GATEWAY_RADIUS + 7, GATEWAY_RADIUS - 5, GATEWAY_RADIUS + 7,
            GATEWAY_RADIUS - 8, GATEWAY_RADIUS - 2 });
    peService.setPropertyValue(pentagonShape, DELETABLE_PROPERTY, "true");
    return pentagon;
  }
View Full Code Here

    points.add(gaService.createPoint(n3, n3));
    points.add(gaService.createPoint(n3, n4));
    points.add(gaService.createPoint(n2, n4));
    points.add(gaService.createPoint(n2, n3));
    points.add(gaService.createPoint(n1, n3));
    Polygon cross = gaService.createPolygon(crossShape, points);
    cross.setFilled(false);
    cross.setLineWidth(1);
    peService.setPropertyValue(crossShape, DELETABLE_PROPERTY, "true");
    return cross;
  }
View Full Code Here

    gaService.setLocationAndSize(image, 8, 8, 20, 20);
    return image;
  }

  public static Polygon createEventSignal(Shape shape) {
    Polygon polygon = gaService.createPolygon(shape, new int[] { 16, 4, 28, 26, 7, 26 });
    polygon.setLineWidth(1);
    return polygon;
  }
View Full Code Here

  }

  public static Polygon createEventEscalation(Shape shape) {
    int r = EVENT_SIZE / 2;
    int[] points = { r, 8, r + 8, r + 9, r, r + 2, r - 8, r + 9 };
    Polygon polygon = gaService.createPolygon(shape, points);
    polygon.setLineWidth(1);
    return polygon;
  }
View Full Code Here

    gaService.setLocationAndSize(rect, 5, 9, w, h);

    int _w = w / 2;
    int _h = h / 2;
    int[] pontsArrow1 = { _w, 0, _w, h, 0, _h };
    Polygon arrow1 = gaService.createPolygon(rect, pontsArrow1);

    int[] pontsArrow2 = { w, 0, w, h, w / 2, _h };
    Polygon arrow2 = gaService.createPolygon(rect, pontsArrow2);

    Compensation compensation = new Compensation();
    compensation.arrow1 = arrow1;
    compensation.arrow2 = arrow2;
    return compensation;
View Full Code Here

  }

  public static Polygon createEventLink(Shape shape) {
    int r = EVENT_SIZE / 2;
    int[] points = { 32, r, 23, r + 11, 23, r + 6, 5, r + 6, 5, r - 6, 23, r - 6, 23, r - 11 };
    Polygon polygon = gaService.createPolygon(shape, points);
    polygon.setLineWidth(1);
    return polygon;
  }
View Full Code Here

  }

  public static Polygon createEventError(Shape shape) {
    int r = EVENT_SIZE / 2;
    int[] points = { r + 4, r, r + 10, r - 10, r + 7, r + 10, r - 4, r, r - 10, r + 10, r - 7, r - 10 };
    Polygon polygon = gaService.createPolygon(shape, points);
    polygon.setLineWidth(1);
    return polygon;
  }
View Full Code Here

    int a = 9;
    int b = 12;
    int c = 4;
    int[] points = { r, r - c, r + a, r - b, r + b, r - a, r + c, r, r + b, r + a, r + a, r + b, r, r + c, r - a,
            r + b, r - b, r + a, r - c, r, r - b, r - a, r - a, r - b };
    Polygon polygon = gaService.createPolygon(shape, points);
    polygon.setLineWidth(1);
    return polygon;
  }
View Full Code Here

    int r = EVENT_SIZE / 2;
    int a = 3;
    int b = 11;
    int[] points = { r - a, r - b, r + a, r - b, r + a, r - a, r + b, r - a, r + b, r + a, r + a, r + a, r + a,
            r + b, r - a, r + b, r - a, r + a, r - b, r + a, r - b, r - a, r - a, r - a };
    Polygon cross = gaService.createPolygon(shape, points);
    cross.setFilled(false);
    cross.setLineWidth(1);
    return cross;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.algorithms.Polygon

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.