return intoDiagram || intoLane || intoParticipant || intoFlowELementContainer;
}
@Override
public PictogramElement add(IAddContext context) {
Event e = (Event) context.getNewObject();
IPeService peService = Graphiti.getPeService();
ContainerShape containerShape = peService.createContainerShape(context.getTargetContainer(), true);
IGaService gaService = Graphiti.getGaService();
Rectangle invisibleRect = gaService.createInvisibleRectangle(containerShape);
gaService.setLocationAndSize(invisibleRect, context.getX(), context.getY(), EVENT_SIZE, EVENT_SIZE
+ EVENT_TEXT_AREA);
Shape ellipseShape = peService.createShape(containerShape, false);
peService.setPropertyValue(ellipseShape, EVENT_ELEMENT, EVENT_CIRCLE);
Ellipse ellipse = createEventShape(ellipseShape);
StyleUtil.applyBGStyle(ellipse, this);
decorateEllipse(ellipse);
Shape textShape = peService.createShape(containerShape, false);
peService.setPropertyValue(textShape, UpdateBaseElementNameFeature.TEXT_ELEMENT, Boolean.toString(true));
Text text = gaService.createDefaultText(getDiagram(), textShape, e.getName());
text.setStyle(StyleUtil.getStyleForText(getDiagram()));
text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
gaService.setLocationAndSize(text, 0, EVENT_SIZE, EVENT_SIZE, EVENT_TEXT_AREA);