yTop = getCoreDimensions().getYTop() + (getYSpacing() / 2);
endXLeft = centerNHLayout - (getEndIconWidth() / 2) + (getXSpacing() / 2);
endYTop = getCoreDimensions().getYTop() + getCoreDimensions().getHeight() - getEndIconHeight() - (getYSpacing() / 2);
}
ActivityInterface activity = null;
Iterator<org.wso2.carbon.bpel.ui.bpel2svg.ActivityInterface> itr = getSubActivities().iterator();
int childYTop = 0;
int childXLeft = 0;
if (isSimpleLayout()) {
childYTop = yTop + getStartIconHeight() + (getYSpacing() / 2);
childXLeft = startXLeft + (getXSpacing() / 2);
} else {
childYTop = getCoreDimensions().getYTop() + getStartIconHeight() + (getYSpacing() / 2);
childXLeft = getCoreDimensions().getXLeft() + (getXSpacing() / 2);
}
// Process None Handlers First
while (itr.hasNext()) {
activity = itr.next();
if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
// Ignore
} else {
activity.layout(childXLeft, childYTop);
childXLeft += activity.getDimensions().getWidth();
}
}
// Process Handlers
itr = getSubActivities().iterator();
childXLeft = startXLeft + getCoreDimensions().getWidth();
childYTop = yTop + getHandlerAdjustment();
while (itr.hasNext()) {
activity = itr.next();
if (activity instanceof FaultHandlerImpl || activity instanceof TerminationHandlerImpl || activity instanceof CompensationHandlerImpl || activity instanceof EventHandlerImpl) {
activity.layout(childXLeft, childYTop);
childXLeft += activity.getDimensions().getWidth();
}
}
// Set the values
setStartIconXLeft(xLeft);