Package org.eclipse.graphiti.services

Examples of org.eclipse.graphiti.services.IPeService.createShape()


  }

  private Shape createCollectionShape(ContainerShape container, int[] xy) {
    IPeService peService = Graphiti.getPeService();
    IGaService gaService = Graphiti.getGaService();
    Shape collectionShape = peService.createShape(container, false);
    Polyline line = gaService.createPolyline(collectionShape, xy);
    line.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    line.setLineWidth(1);
    line.setLineVisible(false);
    peService.setPropertyValue(collectionShape, Properties.HIDEABLE_PROPERTY, Boolean.toString(true));
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);
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);
View Full Code Here

    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);
View Full Code Here

    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);
View Full Code Here

    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

    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

    Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), EVENT_SIZE, EVENT_SIZE
            + EVENT_TEXT_AREA);

    Shape ellipseShape = peService.createShape(containerShape, false);
    peService.setPropertyValue(ellipseShape, EVENT_ELEMENT, EVENT_CIRCLE);
    Ellipse ellipse = createEventShape(ellipseShape);
    StyleUtil.applyBGStyle(ellipse, this);
    decorateEllipse(ellipse);
View Full Code Here

    peService.setPropertyValue(ellipseShape, EVENT_ELEMENT, EVENT_CIRCLE);
    Ellipse ellipse = createEventShape(ellipseShape);
    StyleUtil.applyBGStyle(ellipse, this);
    decorateEllipse(ellipse);

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

  @Override
  protected void hook(Activity activity, ContainerShape container, IAddContext context, int width, int height) {
    IPeService peService = Graphiti.getPeService();
    IGaService gaService = Graphiti.getGaService();

    Shape textShape = peService.createShape(container, false);
    MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, activity.getName());
    int padding = GraphicsUtil.TASK_IMAGE_SIZE;
    gaService.setLocationAndSize(text, 0, padding, width, height - padding);
    text.setStyle(StyleUtil.getStyleForText(getDiagram()));
    text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.