Package org.eclipse.graphiti.mm.pictograms

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


    ChoreographyActivity choreography = (ChoreographyActivity) context.getNewObject();

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

    ContainerShape choreographyContainer = peService.createContainerShape(context.getTargetContainer(), true);
    RoundedRectangle containerRect = gaService.createRoundedRectangle(choreographyContainer, R, R);
    gaService.setLocationAndSize(containerRect, context.getX(), context.getY(), width, height);
    StyleUtil.applyBGStyle(containerRect, this);
    decorateContainerRect(containerRect);
View Full Code Here


      }
    }

    for (BPMNShape bpmnShape : filteredShapes) {
      ParticipantBandKind bandKind = bpmnShape.getParticipantBandKind();
      ContainerShape createdShape = ChoreographyUtil.createParticipantBandContainerShape(bandKind,
          choreographyContainer, bpmnShape, isShowNames());
      createDIShape(createdShape, bpmnShape.getBpmnElement(), bpmnShape);
      Participant p = (Participant) bpmnShape.getBpmnElement();
      if (p.getParticipantMultiplicity() != null && p.getParticipantMultiplicity().getMaximum() > 1) {
        drawMultiplicityMarkers(createdShape);
View Full Code Here

    SubProcess subprocess = (SubProcess) context.getNewObject();

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

  public IDeleteFeature getDeleteFeature(IFeatureProvider fp) {
    return new DefaultBpmnDeleteFeature(fp) {

      @Override
      public void delete(IDeleteContext context) {
        ContainerShape envelope = (ContainerShape) context.getPictogramElement();
        Map<AnchorLocation, BoundaryAnchor> boundaryAnchors = AnchorUtil.getBoundaryAnchors(envelope);
        BoundaryAnchor topBoundaryAnchor = boundaryAnchors.get(AnchorLocation.TOP);
        BoundaryAnchor bottomBoundaryAnchor = boundaryAnchors.get(AnchorLocation.BOTTOM);
        modifyAffectedBands(topBoundaryAnchor);
        modifyAffectedBands(bottomBoundaryAnchor);
View Full Code Here

    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;

    Rectangle rect = gaService.createRectangle(containerShape);
View Full Code Here

    return BusinessObjectUtil.containsElementOfType(pictoElem, BaseElement.class);
  }

  @Override
  public boolean layout(ILayoutContext context) {
    ContainerShape container = (ContainerShape) context.getPictogramElement();

    Shape textShape = getShape(container, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
    Text textGa = (Text) textShape.getGraphicsAlgorithm();
    String text = textGa.getValue() == null ? "" : textGa.getValue();
    IDimension size = GraphitiUi.getUiLayoutService().calculateTextSize(text, textGa.getFont());

    GraphicsAlgorithm parentGa = container.getGraphicsAlgorithm();

    if (size.getWidth() > getMinimumWidth()) {
      gaService.setSize(parentGa, size.getWidth() + 3, parentGa.getHeight());
    } else {
      gaService.setSize(parentGa, getMinimumWidth(), parentGa.getHeight());
View Full Code Here

  @Override
  public void delete(IDeleteContext context) {
    IFeatureProvider fp = getFeatureProvider();
    PictogramElement pictogramElement = context.getPictogramElement();
    if (pictogramElement instanceof ContainerShape) {
      ContainerShape cShape = (ContainerShape) pictogramElement;
      EList<Anchor> anchors = cShape.getAnchors();
      for (Anchor anchor : anchors) {
        deleteConnections(fp, anchor.getIncomingConnections());
        deleteConnections(fp, anchor.getOutgoingConnections());
      }
      deleteContainer(fp, cShape);
View Full Code Here

    return Reason.createTrueReason();
  }

  @Override
  public boolean update(IUpdateContext context) {
    ContainerShape choreographyContainer = (ContainerShape) context.getPictogramElement();

    ChoreographyTask choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
        ChoreographyTask.class);

    List<InteractionNode> sources = new ArrayList<InteractionNode>();
View Full Code Here

        Group group = (Group) context.getNewObject();

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

        ContainerShape container = peService.createContainerShape(context.getTargetContainer(), true);
        RoundedRectangle rect = gaService.createRoundedRectangle(container, 5, 5);
        rect.setFilled(false);
        rect.setLineWidth(2);
        rect.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        rect.setLineStyle(LineStyle.DASHDOT);
View Full Code Here

      return Reason.createFalseReason();
    }
    IPeService peService = Graphiti.getPeService();
    Participant participant = (Participant) BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
        Participant.class);
    ContainerShape containerShape = (ContainerShape) context.getPictogramElement();

    boolean multiplicityProperty = new Boolean(peService.getPropertyValue(containerShape,
        AddParticipantFeature.MULTIPLICITY));
    boolean hasMultiplicity = participant.getParticipantMultiplicity() != null;
View Full Code Here

TOP

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

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.