Package org.eclipse.graphiti.mm.pictograms

Examples of org.eclipse.graphiti.mm.pictograms.Shape


    peService.setPropertyValue(pentagonShape, DELETABLE_PROPERTY, "true");
    return pentagon;
  }

  public static Ellipse createGatewayInnerCircle(ContainerShape container) {
    Shape ellipseShape = peService.createShape(container, false);
    Ellipse ellipse = gaService.createEllipse(ellipseShape);
    gaService.setLocationAndSize(ellipse, 14, 14, 23, 23);
    ellipse.setFilled(false);
    ellipse.setLineWidth(1);
    peService.setPropertyValue(ellipseShape, DELETABLE_PROPERTY, "true");
View Full Code Here


    peService.setPropertyValue(ellipseShape, DELETABLE_PROPERTY, "true");
    return ellipse;
  }

  public static Ellipse createGatewayOuterCircle(ContainerShape container) {
    Shape ellipseShape = peService.createShape(container, false);
    Ellipse ellipse = gaService.createEllipse(ellipseShape);
    gaService.setLocationAndSize(ellipse, 12, 12, 27, 27);
    ellipse.setFilled(false);
    ellipse.setLineWidth(1);
    peService.setPropertyValue(ellipseShape, DELETABLE_PROPERTY, "true");
View Full Code Here

    peService.setPropertyValue(ellipseShape, DELETABLE_PROPERTY, "true");
    return ellipse;
  }

  public static Cross createGatewayCross(ContainerShape container) {
    Shape verticalShape = peService.createShape(container, false);
    Polyline verticalLine = gaService.createPolyline(verticalShape, new int[] { 24, 7, 24, 43 });
    verticalLine.setLineWidth(3);
    peService.setPropertyValue(verticalShape, DELETABLE_PROPERTY, "false");

    Shape horizontalShape = peService.createShape(container, false);
    Polyline horizontalLine = gaService.createPolyline(horizontalShape, new int[] { 7, 24, 43, 24 });
    horizontalLine.setLineWidth(3);
    peService.setPropertyValue(horizontalShape, DELETABLE_PROPERTY, "false");

    Cross cross = new Cross();
View Full Code Here

    cross.horizontal = horizontalLine;
    return cross;
  }

  public static Polygon createEventGatewayParallelCross(ContainerShape container) {
    Shape crossShape = peService.createShape(container, false);
    int n1 = 14;
    int n2 = 22;
    int n3 = 28;
    int n4 = 36;
    Collection<Point> points = new ArrayList<Point>();
View Full Code Here

    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);
    gaService.setLocationAndSize(gateway, 0, 0, d, d);
    decorateGateway(containerShape);

    Shape textShape = peService.createShape(containerShape, false);
    peService.setPropertyValue(textShape, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
    Text text = gaService.createDefaultText(getDiagram(), textShape, addedGateway.getName());
    text.setStyle(StyleUtil.getStyleForText(getDiagram()));
    text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
    text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
View Full Code Here

  }

  public static Asterisk createGatewayAsterisk(ContainerShape container) {
    IPeService service = Graphiti.getPeService();

    Shape verticalShape = service.createShape(container, false);
    Polyline vertical = gaService.createPolyline(verticalShape, new int[] { 23, 8, 23, 42 });
    vertical.setLineWidth(5);
    peService.setPropertyValue(verticalShape, DELETABLE_PROPERTY, "true");

    Shape horizontalShape = service.createShape(container, false);
    Polyline horizontal = gaService.createPolyline(horizontalShape, new int[] { 8, 24, 42, 24 });
    horizontal.setLineWidth(5);
    peService.setPropertyValue(horizontalShape, DELETABLE_PROPERTY, "true");

    Shape diagonalDescShape = service.createShape(container, false);
    Polyline diagonalDesc = gaService.createPolyline(diagonalDescShape, new int[] { 13, 14, 37, 37 });
    diagonalDesc.setLineWidth(4);
    peService.setPropertyValue(diagonalDescShape, DELETABLE_PROPERTY, "true");

    Shape diagonalAscShape = service.createShape(container, false);
    Polyline diagonalAsc = gaService.createPolyline(diagonalAscShape, new int[] { 37, 14, 13, 37 });
    diagonalAsc.setLineWidth(4);
    peService.setPropertyValue(diagonalAscShape, DELETABLE_PROPERTY, "true");

    Asterisk a = new Asterisk();
View Full Code Here

    int parentW = ((ContainerShape) markerContainer.eContainer()).getGraphicsAlgorithm().getWidth();
    int lastX = -1;

    Iterator<Shape> iterator = peService.getAllContainedShapes(markerContainer).iterator();
    while (iterator.hasNext()) {
      Shape shape = iterator.next();
      String value = peService.getPropertyValue(shape, property);
      GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
      if (value != null && new Boolean(value)) {
        lastX = ga.getX();
        peService.deletePictogramElement(shape);
      } else {
        totalWidth += ga.getWidth();
View Full Code Here

    int parentW = ((ContainerShape) markerContainer.eContainer()).getGraphicsAlgorithm().getWidth();
    int lastX = 0;

    Iterator<Shape> iterator = peService.getAllContainedShapes(markerContainer).iterator();
    while (iterator.hasNext()) {
      Shape containedShape = (Shape) iterator.next();
      GraphicsAlgorithm containedGa = containedShape.getGraphicsAlgorithm();
      totalWidth += containedGa.getWidth();
      lastX = containedGa.getX() + containedGa.getWidth();
    }

    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

  private Text getBodyText(IUpdateContext context) {
    Iterator<Shape> iterator = peService.getAllContainedShapes((ContainerShape) context.getPictogramElement())
        .iterator();
    while (iterator.hasNext()) {
      Shape shape = (Shape) iterator.next();
      String property = peService.getPropertyValue(shape, ChoreographyProperties.CHOREOGRAPHY_NAME);
      if (property != null && new Boolean(property)) {
        return (Text) shape.getGraphicsAlgorithm();
      }
    }
    return null;
  }
View Full Code Here

    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 });
    line.setStyle(StyleUtil.getStyleForClass(getDiagram()));
    line.setLineWidth(2);
    gaService.setLocationAndSize(line, 0, 0, commentEdge, height);

    Shape textShape = peCreateService.createShape(containerShape, false);
    MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, annotation.getText());
    text.setStyle(StyleUtil.getStyleForText(getDiagram()));
    text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
    gaService.setLocationAndSize(text, 5, 5, width - 5, height - 5);
View Full Code Here

TOP

Related Classes of org.eclipse.graphiti.mm.pictograms.Shape

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.