Package org.eclipse.graphiti.mm.pictograms

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


    }

    // SHAPE WITH TEXT
    {
      // create shape for text
      final Shape shape = peCreateService.createShape(containerShape, false);

      // create and set text graphics algorithm
      final Text text = gaService.createDefaultText(getDiagram(), shape, addedPool.getName());
      text.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
      text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
View Full Code Here


    }

    // SHAPE WITH TEXT
    {
      // create shape for text
      final Shape shape = peCreateService.createShape(containerShape, false);

      // create and set text graphics algorithm
      final Text text = gaService.createDefaultText(getDiagram(), shape, addedLane.getName());
      text.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
      text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
View Full Code Here

      // create link and wire it
      link(containerShape, addedGateway);
    }
   
    {
      final Shape shape = peCreateService.createShape(containerShape, false);
     
      final Polyline polyline = gaService.createPolyline(shape, new int[] { width - 10, 10, 10, height - 10 });
      polyline.setLineWidth(5);
      polyline.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
    }
   
    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Polyline polyline = gaService.createPolyline(shape, new int[] { 10, 10, width - 10, height - 10});
      polyline.setLineWidth(5);
      polyline.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
    }
View Full Code Here

      // create link and wire it
      link(containerShape, addedGateway);
    }
   
    {
      final Shape shape = peCreateService.createShape(containerShape, false);
     
      final Polyline polyline = gaService.createPolyline(shape, new int[] { 6, 19, width - 6, 19 });
      polyline.setLineWidth(5);
      polyline.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
    }
   
    {
      final Shape shape = peCreateService.createShape(containerShape, false);
     
      final Polyline polyline = gaService.createPolyline(shape, new int[] { 18, 6, 18, height - 6 });
      polyline.setLineWidth(5);
      polyline.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
    }
View Full Code Here

  }
 
  protected void updateFlowElement(BaseElement flowElement) {
    PictogramElement picElement = featureProvider.getPictogramElementForBusinessObject(flowElement);
    if(picElement instanceof Shape) {
      Shape shape = (Shape) picElement;
      ILocation shapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(shape);
      model.getBpmnModel().addGraphicInfo(flowElement.getId(), createGraphicInfo(shapeLocation.getX(), shapeLocation.getY(),
              shape.getGraphicsAlgorithm().getWidth(), shape.getGraphicsAlgorithm().getHeight()));
    }
  }
View Full Code Here

              shape.getGraphicsAlgorithm().getWidth(), shape.getGraphicsAlgorithm().getHeight()));
    }
  }
 
  protected void updateSequenceFlow(SequenceFlow sequenceFlow) {
    Shape sourceShape = null;
    Shape targetShape = null;
    if(StringUtils.isNotEmpty(sequenceFlow.getSourceRef())) {
      sourceShape = (Shape) featureProvider.getPictogramElementForBusinessObject(model.getFlowElement(sequenceFlow.getSourceRef()));
    }
    if(StringUtils.isNotEmpty(sequenceFlow.getTargetRef())) {
      targetShape = (Shape) featureProvider.getPictogramElementForBusinessObject(model.getFlowElement(sequenceFlow.getTargetRef()));
View Full Code Here

      }
    }
  }
 
  protected void updateAssociation(Association association) {
    Shape sourceShape = null;
    Shape targetShape = null;
    if(StringUtils.isNotEmpty(association.getSourceRef())) {
      BaseElement sourceElement = model.getFlowElement(association.getSourceRef());
      if (sourceElement == null) {
        sourceElement = model.getArtifact(association.getSourceRef());
      }
View Full Code Here

        connection.getBendpoints().add(bendPoint);
      }
     
    } else {
     
      Shape sourceShape = (Shape) getPictogramElement(sourceElement);
      ILocation sourceShapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(sourceShape);
      int sourceX = sourceShapeLocation.getX();
      int sourceY = sourceShapeLocation.getY();
     
      Shape targetShape = (Shape) getPictogramElement(targetElement);
      ILocation targetShapeLocation = Graphiti.getLayoutService().getLocationRelativeToDiagram(targetShape);
      int targetX = targetShapeLocation.getX();
      int targetY = targetShapeLocation.getY();
     
      if (sourceElement instanceof Gateway && targetElement instanceof Gateway == false) {
View Full Code Here

    final int commentEdge = 20;
   
    final Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);
   
    final Shape lineShape = peCreateService.createShape(containerShape, false);
    final Polyline line
      = gaService.createPolyline(lineShape
          , new int[] { commentEdge, 0, 0, 0, 0, height, commentEdge, height });
    line.setStyle(StyleUtil.getStyleForTask(getDiagram()));
    line.setLineWidth(2);
    gaService.setLocationAndSize(line, 0, 0, commentEdge, height);
   
    final Shape textShape = peCreateService.createShape(containerShape, false);
    final MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, annotation.getText());
    text.setStyle(StyleUtil.getStyleForTask(getDiagram()));
    text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
    if (OSUtil.getOperatingSystem() == OSEnum.Mac) {
      text.setFont(gaService.manageFont(getDiagram(), text.getFont().getName(), 11));
View Full Code Here

      // create link and wire it
      link(containerShape, addedEvent);
    }
   
    {
      final Shape shape = peCreateService.createShape(containerShape, false);
      final Image image = gaService.createImage(shape, PluginImage.IMG_ALFRESCO_LOGO.getImageKey());

      gaService.setLocationAndSize(image, 10, 10, IMAGE_SIZE, IMAGE_SIZE);
    }
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.