use of org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementActivityShapeDef in project kie-wb-common by kiegroup.
the class CaseManagementShapeDefFactory method newActivityShape.
@SuppressWarnings("unchecked")
private Shape newActivityShape(final Object instance, final ShapeDef shapeDef) {
final BPMNViewDefinition bpmnDefinition = (BPMNViewDefinition) instance;
final CaseManagementActivityShapeDef cmShapeDef = (CaseManagementActivityShapeDef) shapeDef;
final double width = cmShapeDef.getWidth(bpmnDefinition);
final double height = cmShapeDef.getHeight(bpmnDefinition);
final ActivityView view = cmShapeViewFactory.newActivityView(width, height);
final SafeUri iconUri = cmShapeDef.getIconUri(instance.getClass());
final PictureShapeView iconView = basicShapeViewFactory.pictureFromUri(iconUri, 15d, 15d);
return new ActivityShape(cmShapeDef, iconView, view);
}
Aggregations