Package org.eclipse.graphiti.mm.algorithms

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


   
    for (ProcessingElementParameter p :
      pei.getProcessingElementParameters()) {
     
      Shape shape = peCreateService.createShape(containerShape, true);
      Rectangle r = gaService.createRectangle(shape);
      r.setStyle(StyleUtil.getStyleForPEPort(getDiagram()));

      Text text = gaService.createDefaultText(getDiagram(), r,
          p.getName());
      text.setStyle(StyleUtil.getStyleForText(getDiagram()));
      text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
View Full Code Here


                    polyline.getPoints().set(1, newSecondPoint);
                    anythingChanged = true;

                } else if (graphicsAlgorithm instanceof Rectangle){
                 
                  Rectangle r = (Rectangle) graphicsAlgorithm;
                  r.setWidth((containerWidth/2) - 2);
                 
                  if (getBusinessObjectForPictogramElement(shape)
                      instanceof Output) {
                    r.setX(containerWidth/2 + 2);
                  }
               
                } else {
                    gaService.setWidth(graphicsAlgorithm,
                        containerWidth);
View Full Code Here

        int width = 50;
        int height = 50;
        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);

        int whalf = width / 2;

        int[] xy = { 0, 10, whalf, 20, width, 10, width, height - 10, whalf, height, 0, height - 10 };
View Full Code Here

    ILocation parentLoc = peService.getLocationRelativeToDiagram(parent);
    int y = (int) bounds.getY() - parentLoc.getY();

    Diagram diagram = peService.getDiagramForPictogramElement(parent);
    Rectangle band = gaService.createRectangle(bandShape);
    band.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
    band.setBackground(initiating ? gaService.manageColor(diagram, IColorConstant.WHITE) : gaService.manageColor(
        diagram, IColorConstant.LIGHT_GRAY));
    gaService.setLocationAndSize(band, 0, y, w, h);

    Participant p = (Participant) bpmnShape.getBpmnElement();
    if (showNames) {
View Full Code Here

    connectionLine.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
    connectionLine.setLineStyle(LineStyle.DOT);
    connectionLine.setLineWidth(2);

    ContainerShape envelope = peService.createContainerShape(diagram, true);
    Rectangle invisibleRectangle = gaService.createInvisibleRectangle(envelope);
    gaService.setLocation(invisibleRectangle, x, y);
    gaService.setSize(invisibleRectangle, ENV_W + 50, ENV_H);

    Shape envelopeShape = peService.createShape(envelope, false);
    Envelope envelopeGa = GraphicsUtil.createEnvelope(envelopeShape, 0, 0, ENV_W, ENV_H);
View Full Code Here

  }

  public static void drawMultiplicityMarkers(ContainerShape container) {
    Diagram diagram = peService.getDiagramForPictogramElement(container);
    Shape multiplicityShape = peService.createShape(container, false);
    Rectangle rect = gaService.createInvisibleRectangle(multiplicityShape);

    IDimension size = gaService.calculateSize(container.getGraphicsAlgorithm());
    int w = 10;
    int h = 10;
    int x = (size.getWidth() / 2) - (w / 2);
View Full Code Here

    if (drawingShape != null) {
      peService.deletePictogramElement(drawingShape);
    }

    drawingShape = peService.createShape(markerShape, false);
    Rectangle rectangle = gaService.createInvisibleRectangle(drawingShape);
    gaService.setLocationAndSize(rectangle, 0, 0, MARKER_H, MARKER_H);

    if (type == null || type == ChoreographyLoopType.NONE) {
      return;
    }
View Full Code Here

        int width = context.getWidth() > 0 ? context.getWidth() : 30;
        int height = context.getHeight() > 0 ? context.getHeight() : 20;
        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);

        Envelope envelope = GraphicsUtil.createEnvelope(invisibleRect, 0, 0, width, height);
        envelope.rect.setFilled(true);
        StyleUtil.applyBGStyle(envelope.rect, this);
View Full Code Here

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

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

    Shape rectShape = peService.createShape(containerShape, false);
    RoundedRectangle rect = gaService.createRoundedRectangle(rectShape, 5, 5);
    StyleUtil.applyBGStyle(rect, this);
    gaService.setLocationAndSize(rect, 0, 0, width, height);
    link(rectShape, activity);
    decorateActivityRectangle(rect);
    peService.setPropertyValue(rectShape, "activity", Boolean.toString(true));

    ContainerShape markerContainer = peService.createContainerShape(containerShape, false);
    Rectangle markerInvisibleRect = gaService.createInvisibleRectangle(markerContainer);
    int h = 10;
    int y = height - h - 3 - getMarkerContainerOffset();
    gaService.setLocationAndSize(markerInvisibleRect, 0, y, invisibleRect.getWidth(), h);
    peService.setPropertyValue(markerContainer, GraphicsUtil.ACTIVITY_MARKER_CONTAINER, Boolean.toString(true));
View Full Code Here

    IGaService gaService = Graphiti.getGaService();
    IPeService peService = Graphiti.getPeService();

    ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
    Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);

    gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height + 18);

    Shape rectShape = peService.createShape(containerShape, false);
    RoundedRectangle rect = gaService.createRoundedRectangle(rectShape, 5, 5);
       
    StyleUtil.applyBGStyle(rect, this);   

    gaService.setLocationAndSize(rect, 0, 0, width, height);
    decorateRect(rect);
    link(rectShape, subprocess);

    Rectangle box = gaService.createRectangle(rect);
    gaService.setLocationAndSize(box, 40, 80, 20, 20);
    box.setFilled(false);
    box.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
    decorateBox(box);

    Shape textShape = peService.createShape(containerShape, false);
    MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, subprocess.getName());
    gaService.setLocationAndSize(text, 10, 10, 80, 80);
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.