Package org.eclipse.dd.di

Examples of org.eclipse.dd.di.DiagramElement


        generator.writeEndObject();
        generator.writeEndArray();
    }
   
    private DiagramElement findDiagramElement(BPMNPlane plane, BaseElement baseElement) {
      DiagramElement result = _diagramElements.get(baseElement.getId());
      if (result != null) {
        return result;
      }
      for (DiagramElement element: plane.getPlaneElement()) {
          if ((element instanceof BPMNEdge && ((BPMNEdge) element).getBpmnElement() == baseElement) ||
View Full Code Here


     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetRootElement(DiagramElement newRootElement,
            NotificationChain msgs) {
        DiagramElement oldRootElement = rootElement;
        rootElement = newRootElement;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    DiPackage.DIAGRAM__ROOT_ELEMENT, oldRootElement, newRootElement);
            if (msgs == null)
View Full Code Here

     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetOwningElement(DiagramElement newOwningElement,
            NotificationChain msgs) {
        DiagramElement oldOwningElement = owningElement;
        owningElement = newOwningElement;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    DiPackage.DIAGRAM_ELEMENT__OWNING_ELEMENT, oldOwningElement, newOwningElement);
            if (msgs == null)
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setSourceElement(DiagramElement newSourceElement) {
        DiagramElement oldSourceElement = sourceElement;
        sourceElement = newSourceElement;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    BpmnDiPackage.BPMN_EDGE__SOURCE_ELEMENT, oldSourceElement, sourceElement));
    }
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setTargetElement(DiagramElement newTargetElement) {
        DiagramElement oldTargetElement = targetElement;
        targetElement = newTargetElement;
        if (eNotificationRequired())
            eNotify(new ENotificationImpl(this, Notification.SET,
                    BpmnDiPackage.BPMN_EDGE__TARGET_ELEMENT, oldTargetElement, targetElement));
    }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case DiPackage.DIAGRAM_ELEMENT: {
            DiagramElement diagramElement = (DiagramElement) theEObject;
            T result = caseDiagramElement(diagramElement);
            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
View Full Code Here

    @Override
    public void postReconnect(IReconnectionContext context) {
      super.postReconnect(context);

      BPMNEdge edge = BusinessObjectUtil.getFirstElementOfType(context.getConnection(), BPMNEdge.class);
      DiagramElement de = BusinessObjectUtil.getFirstElementOfType(context.getTargetPictogramElement(), DiagramElement.class);
      if (context.getReconnectType().equals(ReconnectionContext.RECONNECT_TARGET)) {
        edge.setTargetElement(de);
      }
      else {
        edge.setSourceElement(de);
View Full Code Here

  public static void reConnect(BPMNShape shape, Diagram diagram) {
    try {
      ModelHandler handler = ModelHandler.getInstance(diagram);
      for (BPMNEdge bpmnEdge : handler.getAll(BPMNEdge.class)) {
        DiagramElement sourceElement = bpmnEdge.getSourceElement();
        DiagramElement targetElement = bpmnEdge.getTargetElement();
        if (sourceElement != null && targetElement != null) {
          boolean sourceMatches = sourceElement.getId().equals(shape.getId());
          boolean targetMatches = targetElement.getId().equals(shape.getId());
          if (sourceMatches || targetMatches) {
            updateEdge(bpmnEdge, diagram);
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.eclipse.dd.di.DiagramElement

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.