Exemple #1
0
 private Element getLinkArrows(SVGDocument doc) {
   Element group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
   if (links != null && !links.isEmpty()) {
     Set linksSet = links.entrySet();
     Iterator linksIterator = linksSet.iterator();
     while (linksIterator.hasNext()) {
       Map.Entry<String, Link> link = (Map.Entry<String, Link>) linksIterator.next();
       ActivityInterface startActivity = link.getValue().getSource();
       ActivityInterface endActivity = link.getValue().getTarget();
       String linkName = link.getKey();
       // Element pathGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
       // group.setAttributeNS("xlink", "title", linkName);
       group.appendChild(
           drawLink(
               doc,
               startActivity.getExitArrowCoords().getXLeft(),
               startActivity.getExitArrowCoords().getYTop(),
               endActivity.getEntryArrowCoords().getXLeft(),
               endActivity.getEntryArrowCoords().getYTop(),
               startActivity.getStartIconWidth(),
               link.getKey(),
               linkName));
       // group.appendChild(pathGroup);
     }
   }
   return group;
 }
Exemple #2
0
  protected Element getArrows(SVGDocument doc) {
    Element group = doc.createElementNS("http://www.w3.org/2000/svg", "g");
    if (subActivities != null) {
      ActivityInterface startActivity = subActivities.get(0);
      ActivityInterface endActivity = subActivities.get(subActivities.size() - 1);

      startActivity = endActivity; // Should ignore event/fault handlers

      org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = getExitArrowCoords();
      group.appendChild(
          getArrowDefinition(
              doc,
              exitCoords.getXLeft(),
              exitCoords.getYTop(),
              startActivity.getEntryArrowCoords().getXLeft(),
              startActivity.getEntryArrowCoords().getYTop(),
              name,
              startActivity,
              endActivity));
      org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates entryCoords = getEndEntryArrowCoords();
      group.appendChild(
          getArrowDefinition(
              doc,
              endActivity.getExitArrowCoords().getXLeft(),
              endActivity.getExitArrowCoords().getYTop(),
              entryCoords.getXLeft(),
              entryCoords.getYTop(),
              name,
              startActivity,
              endActivity));
    }
    return group;
  }