Search in sources :

Example 1 with CaseManagementTaskShapeDef

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

the class CaseManagementCanvasHandlerTest method makeShape.

@SuppressWarnings("unchecked")
private ActivityShape makeShape() {
    final CaseManagementTaskShapeDef shapeDef = new CaseManagementTaskShapeDef();
    final ActivityView shapeView = new ActivityView(10.0, 20.0);
    final ActivityShape shape = new ActivityShape(shapeDef, new PictureShapeView(new MultiPath()), shapeView);
    return shape;
}
Also used : MultiPath(com.ait.lienzo.client.core.shape.MultiPath) ActivityView(org.kie.workbench.common.stunner.cm.client.shape.view.ActivityView) CaseManagementTaskShapeDef(org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementTaskShapeDef) ActivityShape(org.kie.workbench.common.stunner.cm.client.shape.ActivityShape) PictureShapeView(org.kie.workbench.common.stunner.shapes.client.view.PictureShapeView)

Example 2 with CaseManagementTaskShapeDef

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

the class CaseManagementShapeDefFactoryTest method testBuilders.

@Test
public void testBuilders() {
    final Shape nullShape = tested.newShape(mock(BPMNDefinition.class), new NullShapeDef());
    assertNotNull(nullShape);
    assertTrue(nullShape instanceof NullShape);
    final Shape diagramShape = tested.newShape(new CaseManagementDiagram.CaseManagementDiagramBuilder().build(), new CaseManagementDiagramShapeDef());
    assertNotNull(diagramShape);
    assertTrue(diagramShape instanceof CMContainerShape);
    final Shape subprocessShape = tested.newShape(new AdHocSubprocess.AdHocSubprocessBuilder().build(), new CaseManagementSubprocessShapeDef());
    assertNotNull(subprocessShape);
    assertTrue(subprocessShape instanceof CMContainerShape);
    final Shape activityShape = tested.newShape(new UserTask.UserTaskBuilder().build(), new CaseManagementTaskShapeDef());
    assertNotNull(activityShape);
    assertTrue(activityShape instanceof ActivityShape);
    final Shape activityShape2 = tested.newShape(new ReusableSubprocess.ReusableSubprocessBuilder().build(), new CaseManagementReusableSubprocessTaskShapeDef());
    assertNotNull(activityShape2);
    assertTrue(activityShape2 instanceof ActivityShape);
}
Also used : CaseManagementReusableSubprocessTaskShapeDef(org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementReusableSubprocessTaskShapeDef) NullShapeDef(org.kie.workbench.common.stunner.cm.client.shape.def.NullShapeDef) NullShape(org.kie.workbench.common.stunner.cm.client.shape.NullShape) Shape(org.kie.workbench.common.stunner.core.client.shape.Shape) CMContainerShape(org.kie.workbench.common.stunner.cm.client.shape.CMContainerShape) ActivityShape(org.kie.workbench.common.stunner.cm.client.shape.ActivityShape) CaseManagementTaskShapeDef(org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementTaskShapeDef) NullShape(org.kie.workbench.common.stunner.cm.client.shape.NullShape) CaseManagementDiagramShapeDef(org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementDiagramShapeDef) CMContainerShape(org.kie.workbench.common.stunner.cm.client.shape.CMContainerShape) CaseManagementSubprocessShapeDef(org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementSubprocessShapeDef) BPMNDefinition(org.kie.workbench.common.stunner.bpmn.definition.BPMNDefinition) ActivityShape(org.kie.workbench.common.stunner.cm.client.shape.ActivityShape) Test(org.junit.Test)

Aggregations

ActivityShape (org.kie.workbench.common.stunner.cm.client.shape.ActivityShape)2 CaseManagementTaskShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementTaskShapeDef)2 MultiPath (com.ait.lienzo.client.core.shape.MultiPath)1 Test (org.junit.Test)1 BPMNDefinition (org.kie.workbench.common.stunner.bpmn.definition.BPMNDefinition)1 CMContainerShape (org.kie.workbench.common.stunner.cm.client.shape.CMContainerShape)1 NullShape (org.kie.workbench.common.stunner.cm.client.shape.NullShape)1 CaseManagementDiagramShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementDiagramShapeDef)1 CaseManagementReusableSubprocessTaskShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementReusableSubprocessTaskShapeDef)1 CaseManagementSubprocessShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementSubprocessShapeDef)1 NullShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.NullShapeDef)1 ActivityView (org.kie.workbench.common.stunner.cm.client.shape.view.ActivityView)1 Shape (org.kie.workbench.common.stunner.core.client.shape.Shape)1 PictureShapeView (org.kie.workbench.common.stunner.shapes.client.view.PictureShapeView)1