Package org.uengine.kernel.viewer.swimlane

Examples of org.uengine.kernel.viewer.swimlane.SwimlaneViewer


    SwimLaneCoordinate coodinate=this;
   
    for (int i = 0; i < coodinate.getGraphList().size(); i++) {
      String actStatus = "Ready";
     
      SwimlaneViewer viewer = new SwimlaneViewer();
     
      GraphActivity sga = (GraphActivity) coodinate.getGraphList().get(i);
      Activity activityIncomming = sga.getReferenceActivity();
      String sgaTT = viewer.getActivityWebId(sga, instance, options);
     

      Vector<GraphActivity> outgoing = sga.getNext();
     
      for (int j = 0; j < outgoing.size(); j++) {
        GraphActivity tga = (GraphActivity) outgoing.get(j);
        String tgaTT = viewer.getActivityWebId(tga, instance, options);
       
        Activity activityOutgoing = tga.getReferenceActivity();
        if (tga == null || sga == null)
          continue;
       
View Full Code Here


       
        if (coordinate.getRoleList().size() == 0) {
          String viewOption = (String) options.get(ViewerOptions.SWIMLANE);
          options.put(viewOption, viewOption);
        } else {
          SwimlaneViewer viewer = new SwimlaneViewer();
          sb.append(viewer.render(graph, coordinate, instance, options));
          sb.append("</div>");
         
          sb.append(getScriptSourceForBegin(drawLinerNamespace));
          sb = coordinate.appendCoordinateFunctionScript(instance , sb, options);
          sb.append(getScriptSourceForEnd(drawLinerNamespace));

          return sb;
        }
      } catch (Exception e) {
        e.printStackTrace();
        return sb;
      }
    } else if (options.containsKey("ganttchart")) {
      GanttActivityViewer Viewer = new GanttActivityViewer();
      sb.append(Viewer.render(activity, instance, options));
     
      sb.append("</div>");
      return sb;
    }
   
    if (options.containsKey("viewOnlyScopeTracingTag")) {
      String viewOnlyScopeTracingTag = (String)options.get("viewOnlyScopeTracingTag");
      activity = ((ProcessDefinition)activity).getActivity(viewOnlyScopeTracingTag);
    }
   
    if (instance != null && options.containsKey("total cost")) {
      try {
        long totalCost = CostDeterminationFilter.getTotalCost(instance);
        sb.append("<b>Total Cost: </b>" + totalCost);
      } catch(Exception e) { }
    }
   
    boolean isVertical = options.containsKey("vertical");
   
//    if (isFlowChartCenter) sb.append("<center>"); //flowchart center
   
    sb.append("<table border=0 cellpadding=0 cellspacing=0 style=\"margin:0 auto;\"><tr>");
    sb.append("<td align=center><img src="+imagePathRoot+"images/start"+(isVertical? "_vertical":"")+".gif></td>");

    if(isVertical) sb.append("</tr><tr>");
   
    sb.append("<td>");
    sb.append("<table border='0' cellpadding='0' cellspacing='1'><tr>");
   
    ComplexActivity cActivity = (ComplexActivity)activity;
    //System.out.println("ProcessDefinitionViewer::render : number of child activities: " + cActivity.getChildActivities().size());
   
    for(Enumeration enumeration = cActivity.getChildActivities().elements(); enumeration.hasMoreElements(); ){
      Activity child = (Activity)enumeration.nextElement();
      ActivityUtil activityUtil = new ActivityUtil();

      if (child instanceof ScopeActivity) indexOfScopeActivity++;
      if (viewOnlyScopeIndex > -1 && indexOfScopeActivity != viewOnlyScopeIndex) continue;
     
      if (!activityUtil.isVisible(child, options)) {
        boolean isGrayArrow = false;
        if (!definitionView)
          try{
            isGrayArrow = Activity.STATUS_READY.equals(child.getStatus(instance));
          }catch(Exception e){}
       
        if (isVertical) sb.append("<tr>");

        sb.append("<td align=center><img src="+imagePathRoot+"images/arrow" + (isVertical ? "_vertical":"") +".gif" (isGrayArrow ? " style='filter:alpha(opacity="+unfocusedOpacity+")'":"") +" /></td>");
       
        if(isVertical){
          sb.append("</tr><tr>");
        }
       
        sb.append("<td align='center' id='" + DefaultActivityViewer.getActivityName(child, instance, options) + "'>");
          ActivityViewer viewer = DefaultActivityViewer.createViewer(child);
          sb.append(viewer.render(child, instance, options));
        sb.append("</td>");

        if (isVertical) sb.append("</tr>");
      }
    }
View Full Code Here

TOP

Related Classes of org.uengine.kernel.viewer.swimlane.SwimlaneViewer

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.