protected Element getArrows(SVGDocument doc) {
Element subGroup = null;
subGroup = doc.createElementNS("http://www.w3.org/2000/svg", "g");
if (subActivities != null) {
ActivityInterface prevActivity = null;
ActivityInterface activity = null;
String id = null;
org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates myStartCoords = getStartIconExitArrowCoords();
org.wso2.carbon.bpel.ui.bpel2svg.SVGCoordinates exitCoords = null;
SVGCoordinates entryCoords = null;
Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = subActivities.iterator();
while (itr.hasNext()) {
activity = itr.next();
if (prevActivity != null) {
exitCoords = prevActivity.getExitArrowCoords();
entryCoords = activity.getEntryArrowCoords();
id = prevActivity.getId() + "-" + activity.getId();
subGroup.appendChild(getArrowDefinition(doc, exitCoords.getXLeft(),
exitCoords.getYTop(), entryCoords.getXLeft(),
entryCoords.getYTop(), id, prevActivity, activity));
} else {
entryCoords = activity.getEntryArrowCoords();
subGroup.appendChild(getArrowDefinition(doc, myStartCoords.getXLeft(),
myStartCoords.getYTop(), entryCoords.getXLeft(),
entryCoords.getYTop(), id, prevActivity, activity));
}
prevActivity = activity;