use of org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape in project kie-wb-common by kiegroup.
the class DecisionServiceDividerLineTest method testAsSVGPrimitiveShape.
@Test
public void testAsSVGPrimitiveShape() {
final SVGPrimitiveShape primitiveShape = line.asSVGPrimitiveShape();
assertThat(primitiveShape.get().isDraggable()).isTrue();
}
use of org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape in project kie-wb-common by kiegroup.
the class SVGBasicShapeViewImplTest method setup.
@Before
public void setup() throws Exception {
this.parent = new SVGContainer("parent", new Group().setID("parent"), false, null);
rectangle = new Rectangle(10d, 10d);
this.shape = new SVGPrimitiveShape(rectangle);
this.childShape = new SVGPrimitiveShape(new Rectangle(10d, 10d));
this.child = new SVGBasicShapeViewImpl("svgChild1", childShape, 50d, 23d);
this.tested = new SVGBasicShapeViewImpl("svg-test1", shape, 100, 340);
}
use of org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape in project kie-wb-common by kiegroup.
the class SVGChildViewHandlerTest method testAddChild.
@Test
public void testAddChild() {
primitiveShape = new SVGPrimitiveShape(rectangle);
tested.addChild(primitiveShape);
verify(shapeView, times(1)).addChild(eq(rectangle));
assertEquals(1, tested.getChildren().size());
assertEquals(primitiveShape, tested.getChildren().iterator().next());
}
use of org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape in project kie-wb-common by kiegroup.
the class DecisionServiceDividerLine method asSVGPrimitiveShape.
SVGPrimitiveShape asSVGPrimitiveShape() {
final SVGPrimitiveShape divider = SVGPrimitiveFactory.newSVGPrimitiveShape(this, false, null);
divider.setDragEnabled(true);
return divider;
}
use of org.kie.workbench.common.stunner.svg.client.shape.view.SVGPrimitiveShape in project kie-wb-common by kiegroup.
the class SVGShapeViewImplTest method setup.
@Before
public void setup() throws Exception {
this.parent = new SVGContainer("parent", new Group().setID("parent"), false, null);
rectangle = new Rectangle(10d, 10d);
this.childShape = new SVGPrimitiveShape(new Rectangle(10d, 10d));
this.child = new SVGBasicShapeViewImpl("svgChild1", childShape, 50d, 23d);
this.shape = new SVGPrimitiveShape(rectangle);
this.tested = new SVGShapeViewImpl("svg-test1", shape, 100, 340, false);
}
Aggregations