Search in sources :

Example 11 with ActivityShape

use of org.kie.workbench.common.stunner.cm.client.shape.ActivityShape 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 12 with ActivityShape

use of org.kie.workbench.common.stunner.cm.client.shape.ActivityShape 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)12 Test (org.junit.Test)10 ActivityView (org.kie.workbench.common.stunner.cm.client.shape.view.ActivityView)9 PictureShapeView (org.kie.workbench.common.stunner.shapes.client.view.PictureShapeView)9 Edge (org.kie.workbench.common.stunner.core.graph.Edge)7 View (org.kie.workbench.common.stunner.core.graph.content.view.View)7 CaseManagementTaskShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementTaskShapeDef)2 MutationContext (org.kie.workbench.common.stunner.core.client.shape.MutationContext)2 Node (org.kie.workbench.common.stunner.core.graph.Node)2 MultiPath (com.ait.lienzo.client.core.shape.MultiPath)1 SafeUri (com.google.gwt.safehtml.shared.SafeUri)1 BPMNDefinition (org.kie.workbench.common.stunner.bpmn.definition.BPMNDefinition)1 BPMNViewDefinition (org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition)1 CMContainerShape (org.kie.workbench.common.stunner.cm.client.shape.CMContainerShape)1 NullShape (org.kie.workbench.common.stunner.cm.client.shape.NullShape)1 CaseManagementActivityShapeDef (org.kie.workbench.common.stunner.cm.client.shape.def.CaseManagementActivityShapeDef)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