Package org.eclipse.graphiti.mm.algorithms

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


    ContainerShape containerShape = peCreateService.createContainerShape(targetDiagram, true);

    int width = context.getWidth() > 0 ? context.getWidth() : 600;
    int height = context.getHeight() > 0 ? context.getHeight() : 100;

    Rectangle rect = gaService.createRectangle(containerShape);
    StyleUtil.applyBGStyle(rect, this);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);

    Shape lineShape = peCreateService.createShape(containerShape, false);
    Polyline line = gaService.createPolyline(lineShape, new int[] { 15, 0, 15, height });
View Full Code Here


    ContainerShape containerShape = (ContainerShape) context.getPictogramElement();

    if (participant.getParticipantMultiplicity() != null) {
      Shape shape = peService.createShape(containerShape, false);
      peService.setPropertyValue(shape, MULTIPLICITY_MARKER, Boolean.toString(true));
      Rectangle invisibleRectangle = gaService.createInvisibleRectangle(shape);
      GraphicsAlgorithm parentGa = containerShape.getGraphicsAlgorithm();
      int x = (parentGa.getWidth() / 2) - 10;
      int y = parentGa.getHeight() - 20;
      gaService.setLocationAndSize(invisibleRectangle, x, y, 20, 20);
View Full Code Here

    int height = GraphicsUtil.DATA_HEIGHT;
    int e = 10;
    int textArea = 15;
   
    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 });
View Full Code Here

    polygon.setLineWidth(1);
    return polygon;
  }

  public static Compensation createEventCompensation(Shape shape) {
    Rectangle rect = gaService.createInvisibleRectangle(shape);

    int w = 22;
    int h = 18;
    gaService.setLocationAndSize(rect, 5, 9, w, h);
View Full Code Here

  }

  /* OTHER */

  public static Envelope createEnvelope(GraphicsAlgorithmContainer gaContainer, int x, int y, int w, int h) {
    Rectangle rect = gaService.createRectangle(gaContainer);
    gaService.setLocationAndSize(rect, x, y, w, h);
    rect.setFilled(false);

    Polyline line = gaService.createPolyline(rect, new int[] { 0, 0, w / 2, h / 2, w, 0 });

    Envelope envelope = new Envelope();
    envelope.rect = rect;
View Full Code Here

  public static Expand createActivityMarkerExpand(ContainerShape markerContainer) {
    GraphicsAlgorithmContainer algorithmContainer = createActivityMarkerGaContainer(markerContainer,
            ACTIVITY_MARKER_EXPAND);

    Rectangle rect = gaService.createRectangle(algorithmContainer);
    rect.setFilled(false);
    gaService.setLocationAndSize(rect, 0, 0, 10, 10);

    Expand expand = new Expand();
    expand.rect = rect;
    expand.horizontal = gaService.createPolyline(algorithmContainer, new int[] { 0, 5, 10, 5 });
View Full Code Here

    gaService.setLocationAndSize(ga, (parentW / 2) - (totalWidth / 2), ga.getY(), totalWidth, MARKER_HEIGHT);

    Shape shape = peService.createShape(markerContainer, false);
    peService.setPropertyValue(shape, property, Boolean.toString(true));
    Rectangle invisibleRect = gaService.createInvisibleRectangle(shape);
    gaService.setLocationAndSize(invisibleRect, lastX, 0, MARKER_WIDTH, MARKER_HEIGHT);

    return invisibleRect;
  }
View Full Code Here

    int d = 2 * GraphicsUtil.GATEWAY_RADIUS;
    int p = GraphicsUtil.GATEWAY_TEXT_AREA;

    ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
    Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), d, d + p);

    Shape gatewayShape = peService.createShape(containerShape, false);
    Polygon gateway = GraphicsUtil.createGateway(gatewayShape);
    StyleUtil.applyBGStyle(gateway, this);
View Full Code Here

    int w = context.getWidth() > 0 ? context.getWidth() : 30;
    int h = context.getHeight() > 0 ? context.getHeight() : 30;

    ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
    Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), w, h);

    int w_5th = w / 5;
    int[] xy = { w_5th, 0, w_5th * 4, 0, w, h / 2, w_5th * 4, h, w_5th, h, 0, h / 2 };
    Polygon hexagon = gaService.createPolygon(rect, xy);
View Full Code Here

    int width = context.getWidth() > 0 ? context.getWidth() : 50;
    int height = context.getHeight() > 0 ? context.getHeight() : 100;
    int commentEdge = 15;

    Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);

    Shape lineShape = peCreateService.createShape(containerShape, false);
    Polyline line = gaService.createPolyline(lineShape, new int[] { commentEdge, 0, 0, 0, 0, height, commentEdge,
        height });
View Full Code Here

TOP

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

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.