Package org.eclipse.graphiti.mm.pictograms

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


  public static void updateParticipantReferences(ContainerShape choreographyContainer,
      List<ContainerShape> currentParticipantContainers, List<Participant> newParticipants, IFeatureProvider fp,
      boolean showNames) {

    Diagram diagram = peService.getDiagramForShape(choreographyContainer);
    ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
        ChoreographyActivity.class);

    BPMNDiagram dia = BusinessObjectUtil.getFirstElementOfType(diagram, BPMNDiagram.class);
    List<DiagramElement> diElements = dia.getPlane().getPlaneElement();
View Full Code Here


    Bounds bounds = bpmnShape.getBounds();
    int w = (int) bounds.getWidth();
    int h = (int) bounds.getHeight();

    Diagram diagram = peService.getDiagramForPictogramElement(parent);
    RoundedRectangle band = gaService.createRoundedRectangle(bandShape, R, R);
    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, 0, w, h);
View Full Code Here

    int h = (int) bounds.getHeight();

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

    Diagram diagram = peService.getDiagramForPictogramElement(parent);
    RoundedRectangle band = gaService.createRoundedRectangle(bandShape, R, R);
    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);
View Full Code Here

    int h = (int) bounds.getHeight();

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

        Boolean.toString(bpmnShape.isIsMessageVisible()));
    return bandShape;
  }

  private static void addBandLabel(ContainerShape container, String name, int w, int h) {
    Diagram diagram = peService.getDiagramForShape(container);
    Shape labelShape = peService.createShape(container, false);
    Text label = gaService.createDefaultText(diagram, labelShape);
    label.setValue(name);
    gaService.setLocationAndSize(label, 0, 0, w, h);
    label.setStyle(StyleUtil.getStyleForText(peService.getDiagramForPictogramElement(container)));
View Full Code Here

      return initiating ? ParticipantBandKind.MIDDLE_INITIATING : ParticipantBandKind.MIDDLE_NON_INITIATING;
    }
  }

  private static void drawMessageLink(String name, BoundaryAnchor boundaryAnchor, int x, int y, boolean filled) {
    Diagram diagram = peService.getDiagramForAnchor(boundaryAnchor.anchor);

    FreeFormConnection connection = peService.createFreeFormConnection(diagram);
    Polyline connectionLine = gaService.createPolyline(connection);
    connectionLine.setForeground(gaService.manageColor(diagram, StyleUtil.CLASS_FOREGROUND));
    connectionLine.setLineStyle(LineStyle.DOT);
View Full Code Here

    connection.setEnd(AnchorUtil.getBoundaryAnchors(envelope).get(envelopeAnchorLoc).anchor);
    peService.setPropertyValue(envelope, MESSAGE_LINK, Boolean.toString(true));
  }

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

        bindReference(e, propertyDescriptor.getDisplayName(e));
      }
    }

    if (be instanceof Participant) {
      Diagram diagram = bpmn2Editor.getDiagramTypeProvider().getDiagram();
      if (shape != null && shape.getParticipantBandKind() != null) {
        bindBoolean(shape.eClass().getEStructuralFeature(BpmnDiPackage.BPMN_SHAPE__IS_MESSAGE_VISIBLE),
            createBooleanInput("Is Message Visible"), shape);
      }
View Full Code Here

  public PictogramElement add(IAddContext context) {
    Participant p = (Participant) context.getNewObject();
    IGaService gaService = Graphiti.getGaService();
    IPeService peService = Graphiti.getPeService();

    Diagram targetDiagram = (Diagram) context.getTargetContainer();
    IPeCreateService peCreateService = Graphiti.getPeCreateService();
    ContainerShape containerShape = peCreateService.createContainerShape(targetDiagram, true);

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

    postResizeFixLenghts(root);
    updateDI(root);
  }

  private static void updateDI(ContainerShape root) {
    Diagram diagram = Graphiti.getPeService().getDiagramForPictogramElement(root);

    Class<?> instanceClass = BusinessObjectUtil.getFirstElementOfType(root, BaseElement.class).eClass()
        .getInstanceClass();
    DIUtils.updateDIShape(root);
  }
View Full Code Here

TOP

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

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.