ContainerShape container = peService.createContainerShape(context.getTargetContainer(), true);
Rectangle invisibleRect = gaService.createInvisibleRectangle(container);
gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), width, height + textArea);
Shape rectShape = peService.createShape(container, false);
Polygon rect = gaService.createPolygon(rectShape, new int[] { 0, 0, width - e, 0, width, e, width, height, 0,
height });
rect.setLineWidth(1);
StyleUtil.applyBGStyle(rect, this);
decorate(rect);
int p = width - e - 1;
Polyline edge = gaService.createPolyline(rect, new int[] { p, 0, p, e + 1, width, e + 1 });
edge.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
edge.setLineWidth(1);
if (isSupportCollectionMarkers()) {
int whalf = width / 2;
createCollectionShape(container, new int[] { whalf - 2, height - 8, whalf - 2, height });
createCollectionShape(container, new int[] { whalf, height - 8, whalf, height });
createCollectionShape(container, new int[] { whalf + 2, height - 8, whalf + 2, height });
Graphiti.getPeService().setPropertyValue(container, Properties.COLLECTION_PROPERTY, Boolean.toString(false));
}
Shape textShape = peService.createShape(container, false);
peService.setPropertyValue(textShape, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
Text text = gaService.createDefaultText(getDiagram(), textShape, getName(t));
text.setStyle(StyleUtil.getStyleForText(getDiagram()));
text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);