{
// create shape for text
final Shape shape = peCreateService.createShape(containerShape, false);
// create and set text graphics algorithm
final Text text = gaService.createDefaultText(getDiagram(), shape, addedSubProcess.getName());
text.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
Font font = null;
if (OSUtil.getOperatingSystem() == OSEnum.Mac) {
font = gaService.manageFont(getDiagram(), text.getFont().getName(), 11, false, true);
} else {
font = gaService.manageDefaultFont(getDiagram(), false, true);
}
text.setFont(font);
gaService.setLocationAndSize(text, 0, 0, width, 20);
// create link and wire it
link(shape, addedSubProcess);