use of org.kie.workbench.common.stunner.svg.client.shape.impl.SVGMutableShapeImpl in project kie-wb-common by kiegroup.
the class SVGShapeFactory method newSVGMutableShape.
@SuppressWarnings("unchecked")
private SVGShape<?> newSVGMutableShape(final Object instance, final SVGShapeDef shapeDef) {
final SVGShapeViewDef mutableShapeDef = (SVGShapeViewDef) shapeDef;
final SVGShapeView view = newSVGShapeView(instance, mutableShapeDef);
return new SVGMutableShapeImpl<Object, SVGShapeViewDef<Object, Object>>(mutableShapeDef, (SVGShapeViewImpl) view);
}
use of org.kie.workbench.common.stunner.svg.client.shape.impl.SVGMutableShapeImpl in project kie-wb-common by kiegroup.
the class SVGShapeFactoryTest method testSVGMutableShapeDefBuilder.
@Test
public void testSVGMutableShapeDefBuilder() {
doAnswer(invocationOnMock -> viewFactory).when(tested).getViewFactory(eq(svgMutableShapeDef));
final SVGShape shape = tested.newShape(definition, svgMutableShapeDef);
assertNotNull(shape);
assertTrue(shape instanceof SVGMutableShapeImpl);
assertEquals(shapeViewImpl, shape.getShapeView());
}
Aggregations