Package org.eclipse.graphiti.mm.pictograms

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


    return bo != null && bo instanceof Event;
  }

  @Override
  public PictogramElement add(IAddContext context) {
    ContainerShape container = context.getTargetContainer();
    Event event = (Event) getBusinessObjectForPictogramElement(container);

    EventWithDefinitions definitions = support.create(event);
    int size = definitions.getEventDefinitions().size();
View Full Code Here


    FeatureSupport.redraw(context.getSourceContainer());
    FeatureSupport.redraw(context.getTargetContainer());
  }

  private Lane getTargetLane(IMoveShapeContext context) {
    ContainerShape targetContainer = context.getTargetContainer();
    return (Lane) getBusinessObjectForPictogramElement(targetContainer);
  }
View Full Code Here

    return bo != null && bo instanceof Participant;
  }

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

    GraphicsAlgorithm containerGa = containerShape.getGraphicsAlgorithm();
    IGaService gaService = Graphiti.getGaService();

    int containerHeight = containerGa.getHeight();
    Iterator<Shape> iterator = containerShape.getChildren().iterator();
    while (iterator.hasNext()) {
      Shape shape = iterator.next();
      GraphicsAlgorithm ga = shape.getGraphicsAlgorithm();
      IDimension size = gaService.calculateSize(ga);
      if (containerHeight != size.getHeight()) {
View Full Code Here

            .getTopAndBottomBands(bandContainers);
        List<ContainerShape> topBands = topAndBottomBands.getFirst();

        int y = 3;
        if (!topBands.isEmpty()) {
          ContainerShape containerShape = topBands.get(topBands.size() - 1);
          GraphicsAlgorithm ga = containerShape.getGraphicsAlgorithm();
          y = ga.getY() + ga.getHeight() + 3;
        }

        gaService.setLocationAndSize(text, 0, y, w, TEXT_H);
      }
View Full Code Here

        .getTopAndBottomBands(bandContainers);
    List<ContainerShape> topBands = topAndBottomBands.getFirst();

    int y = 3;
    if (!topBands.isEmpty()) {
      ContainerShape containerShape = topBands.get(topBands.size() - 1);
      GraphicsAlgorithm ga = containerShape.getGraphicsAlgorithm();
      y = ga.getY() + ga.getHeight() + 3;
    }

    gaService.setLocationAndSize(text, 0, y, w, TEXT_H);
  }
View Full Code Here

    return BusinessObjectUtil.containsElementOfType(context.getPictogramElement(), ChoreographyActivity.class);
  }

  @Override
  public IReason updateNeeded(IUpdateContext context) {
    ContainerShape choreographyContainer = (ContainerShape) context.getPictogramElement();
    ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
        ChoreographyActivity.class);

    String loopType = choreography.getLoopType() == null ? "null" : choreography.getLoopType().getName();
    String property = peService.getPropertyValue(choreographyContainer, ChoreographyProperties.CHOREOGRAPHY_MARKER);
View Full Code Here

    }
  }

  @Override
  public boolean update(IUpdateContext context) {
    ContainerShape choreographyContainer = (ContainerShape) context.getPictogramElement();
    ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(choreographyContainer,
        ChoreographyActivity.class);

    for (Shape s : peService.getAllContainedShapes(choreographyContainer)) {
      String property = peService.getPropertyValue(s, ChoreographyProperties.CHOREOGRAPHY_MARKER_SHAPE);
View Full Code Here

    @Override
    public boolean update(IUpdateContext context) {
      IPeService peService = Graphiti.getPeService();
      IGaService gaService = Graphiti.getGaService();

      ContainerShape container = (ContainerShape) context.getPictogramElement();
      CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
          CallActivity.class);

      ContainerShape markerContainer = (ContainerShape) getShape(container,
          GraphicsUtil.ACTIVITY_MARKER_CONTAINER);
      Shape globalTaskShape = getShape(container, GLOBAL_TASK_SHAPE_PROPERTY);

      if (callActivity.getCalledElementRef() == null) {
        GraphicsUtil.clearActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
View Full Code Here

  }

  @Override
  public boolean update(IUpdateContext context) {

    ContainerShape container = (ContainerShape) context.getPictogramElement();

    ChoreographyActivity choreography = BusinessObjectUtil.getFirstElementOfType(container,
        ChoreographyActivity.class);

    boolean hasInitiatingParticipant = choreography.getInitiatingParticipantRef() != null;
View Full Code Here

    IPeService peService = Graphiti.getPeService();
    Collection<Shape> shapes = peService.getAllContainedShapes((ContainerShape) context.getShape());
    for (Shape s : shapes) {
      Participant participant = BusinessObjectUtil.getFirstElementOfType(s, Participant.class);
      if (participant != null) {
        ContainerShape container = (ContainerShape) s;
        GraphicsAlgorithm ga = container.getGraphicsAlgorithm();

        BPMNShape bpmnShape = BusinessObjectUtil.getFirstElementOfType(s, BPMNShape.class);
        ILocation loc = Graphiti.getLayoutService().getLocationRelativeToDiagram(context.getShape());

        Bounds bounds = bpmnShape.getBounds();
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.