Package org.eclipse.graphiti.mm.pictograms

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


    AbstractNode selectedNode = this.node == null ? designEditor.getSelectedNode() : node;
    if (selectedNode == null) {
      // use the route node in this case
      selectedNode = designEditor.getSelectedRoute();
    }
    PictogramElement pe = selectedNode instanceof RouteSupport ? designEditor.getDiagram() : designEditor.getFeatureProvider().getPictogramElementForBusinessObject(selectedNode);
    if (pe == null) {
      Activator.getLogger().debug("Warning could not find PictogramElement for selectedNode: " + selectedNode);
    }
    UpdateContext ctx = new UpdateContext(pe);
    IUpdateFeature updateFeature = designEditor.getFeatureProvider().getUpdateFeature(ctx);
View Full Code Here


  @Override
  public void preRemove(IRemoveContext context) {
    super.preRemove(context);
   
    // now delete the BO from our model
    PictogramElement pe = context.getPictogramElement();
    Object[] businessObjectsForPictogramElement = getAllBusinessObjectsForPictogramElement(pe);
    if (businessObjectsForPictogramElement != null &&
        businessObjectsForPictogramElement.length > 0) {
      Object bo = businessObjectsForPictogramElement[0];
      if (bo instanceof Flow) {
View Full Code Here

        super(fp);
    }
   
    @Override
    public void execute(ICustomContext context) {
      PictogramElement _pe = context.getPictogramElements()[0] instanceof Connection ? ((Connection) context.getPictogramElements()[0])
                .getStart().getParent() : context.getPictogramElements()[0];
        final Object bo = getBusinessObjectForPictogramElement(_pe);
       
        if (bo instanceof AbstractNode) {
          AbstractNode _ep = (AbstractNode)bo;
View Full Code Here

   * @see org.eclipse.graphiti.features.custom.AbstractCustomFeature#isAvailable(org.eclipse.graphiti.features.context.IContext)
   */
  @Override
  public boolean isAvailable(IContext context) {
    ICustomContext cc = (ICustomContext)context;
    PictogramElement _pe = cc.getPictogramElements()[0] instanceof Connection ? ((Connection) cc.getPictogramElements()[0])
                .getStart().getParent() : cc.getPictogramElements()[0];
        final Object bo = getBusinessObjectForPictogramElement(_pe);
       
        if (bo instanceof AbstractNode) {
          AbstractNode _ep = (AbstractNode)bo;
View Full Code Here

        pentagon.setFilled(false);
      }

      @Override
      public PictogramElement add(IAddContext context) {
        PictogramElement element = super.add(context);
        IPeService service = Graphiti.getPeService();
        service.setPropertyValue(element, INSTANTIATE_PROPERTY, "false");
        service.setPropertyValue(element, EVENT_GATEWAY_TYPE_PROPERTY,
            EventBasedGatewayType.EXCLUSIVE.getName());
        return element;
View Full Code Here

    composite.setSheetPage(aTabbedPropertySheetPage);
  }

  @Override
  public void refresh() {
    PictogramElement pe = getSelectedPictogramElement();
    if (pe != null) {
      EObject be = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
      if (be instanceof BPMNDiagramImpl) {
        try {
          composite.setEObject((BPMN2Editor) getDiagramEditor(),
View Full Code Here

  }

  public static boolean isChoreographyParticipantBand(PictogramElement element) {
    EObject container = element.eContainer();
    if (container instanceof PictogramElement) {
      PictogramElement containerElem = (PictogramElement) container;
      if (BusinessObjectUtil.containsElementOfType(containerElem, ChoreographyActivity.class)) {
        return true;
      }
    }
    return false;
View Full Code Here

    if (!hasTopMessage && shouldDrawTopMessage) {
      int y = (int) (bounds.getY() - ENVELOPE_HEIGHT_MODIFIER - ENV_H);
      drawMessageLink(topMessageName, topBoundaryAnchor, x, y, isFilled(topAndBottom.getFirst()));
    } else if (hasTopMessage && !shouldDrawTopMessage) {
      PictogramElement envelope = (PictogramElement) topConnections.get(topConnectionIndex).getEnd().eContainer();
      peService.deletePictogramElement(topConnections.get(topConnectionIndex));
      peService.deletePictogramElement(envelope);
    } else if (hasTopMessage && shouldDrawTopMessage) {
      PictogramElement envelope = (PictogramElement) topConnections.get(topConnectionIndex).getEnd().eContainer();
      setMessageLabel(topMessageName, envelope);
    }

    if (!hasBottomMessage && shouldDrawBottomMessage) {
      int y = (int) (bounds.getY() + bounds.getHeight() + ENVELOPE_HEIGHT_MODIFIER);
      drawMessageLink(bottomMessageName, bottomBoundaryAnchor, x, y, isFilled(topAndBottom.getSecond()));
    } else if (hasBottomMessage && !shouldDrawBottomMessage) {
      PictogramElement envelope = (PictogramElement) bottomConnections.get(bottomConnectionIndex).getEnd()
          .eContainer();
      peService.deletePictogramElement(bottomConnections.get(bottomConnectionIndex));
      peService.deletePictogramElement(envelope);
    } else if (hasBottomMessage && shouldDrawBottomMessage) {
      PictogramElement envelope = (PictogramElement) bottomConnections.get(bottomConnectionIndex).getEnd()
          .eContainer();
      setMessageLabel(bottomMessageName, envelope);
    }

    return;
View Full Code Here

    return algorithms;
  }

  public static GraphicsAlgorithm getSelectionBorder(PictogramElement element) {
    Collection<Shape> children = Graphiti.getPeService().getAllContainedShapes((ContainerShape) element);
    PictogramElement first = children.iterator().next();
    return first.getGraphicsAlgorithm();
  }
View Full Code Here

    return algorithms;
  }

  public static GraphicsAlgorithm getSelectionBorder(PictogramElement element) {
    Collection<PictogramElement> children = Graphiti.getPeService().getPictogramElementChildren(element);
    PictogramElement first = children.iterator().next();
    return first.getGraphicsAlgorithm();
  }
View Full Code Here

TOP

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

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.