Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.LaneSet.eContainer()


  @Override
  public int compare(Shape o1, Shape o2) {
    Lane l1 = BusinessObjectUtil.getFirstElementOfType(o1, Lane.class);
    Lane l2 = BusinessObjectUtil.getFirstElementOfType(o2, Lane.class);

    if (l1 != null && l2 != null && l1.eContainer().equals(l2.eContainer())) {
      int y1 = o1.getGraphicsAlgorithm().getY();
      int y2 = o2.getGraphicsAlgorithm().getY();
      return new Integer(y1).compareTo(y2);
    }
    return 0;
View Full Code Here


  private void modifyModelStructure(Lane targetLane, Lane lane) {
    LaneSet laneSet = (LaneSet) lane.eContainer();
    laneSet.getLanes().remove(lane);

    if (laneSet.getLanes().size() == 0) {
      EObject container = laneSet.eContainer();
      if (container instanceof Process) {
        Process p = (Process) container;
        p.getLaneSets().remove(laneSet);
      }
    }
View Full Code Here

                     // find the special process for root level tasks:
                        rootLevelProcess.getFlowElements().add((DataObject) child);
                        ItemDefinition def = ((DataObject) child).getItemSubjectRef();
                        if (def != null) {
                            if (def.eResource() == null) {
                                ((Definitions) rootLevelProcess.eContainer()).getRootElements().add(0, def);
                            }
                            Import imported = def.getImport();
                            if (imported != null && imported.eResource() == null) {
                                ((Definitions) rootLevelProcess.eContainer()).getImports().add(0, imported);
                            }
View Full Code Here

                            if (def.eResource() == null) {
                                ((Definitions) rootLevelProcess.eContainer()).getRootElements().add(0, def);
                            }
                            Import imported = def.getImport();
                            if (imported != null && imported.eResource() == null) {
                                ((Definitions) rootLevelProcess.eContainer()).getImports().add(0, imported);
                            }
                        }
                       
                    } else {
                        throw new IllegalArgumentException("Don't know what to do of " + child);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.