Search in sources :

Example 1 with StageShapeDef

use of org.kie.workbench.common.stunner.cm.client.shape.def.StageShapeDef in project kie-wb-common by kiegroup.

the class CaseManagementShapeDefFactory method newStageShape.

@SuppressWarnings("unchecked")
private Shape newStageShape(final Object instance, final ShapeDef shapeDef) {
    final BPMNViewDefinition bpmnDefinition = (BPMNViewDefinition) instance;
    final StageShapeDef cmShapeDef = (StageShapeDef) shapeDef;
    final double width = cmShapeDef.getWidth(bpmnDefinition);
    final double height = cmShapeDef.getHeight(bpmnDefinition);
    final double dropWidth = cmShapeDef.getDropAreaWidth(bpmnDefinition);
    final double dropHeight = cmShapeDef.getDropAreaHeight(bpmnDefinition);
    final double voffset = cmShapeDef.getVOffset(bpmnDefinition);
    final StageView view = cmShapeViewFactory.newStageView(dropWidth, dropHeight, voffset).setWidth(width).setHeight(height);
    return new CMContainerShape(cmShapeDef, view);
}
Also used : StageShapeDef(org.kie.workbench.common.stunner.cm.client.shape.def.StageShapeDef) BPMNViewDefinition(org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition) StageView(org.kie.workbench.common.stunner.cm.client.shape.view.StageView) CMContainerShape(org.kie.workbench.common.stunner.cm.client.shape.CMContainerShape)

Aggregations

BPMNViewDefinition (org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition)1 CMContainerShape (org.kie.workbench.common.stunner.cm.client.shape.CMContainerShape)1 StageShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.StageShapeDef)1 StageView (org.kie.workbench.common.stunner.cm.client.shape.view.StageView)1