use of com.ait.lienzo.client.core.shape.wires.handlers.WiresConnectorControl in project kie-wb-common by kiegroup.
the class WiresConnectorViewTest method testHideControlPoints.
@Test
public void testHideControlPoints() {
final WiresConnectorControl connectorControl = mock(WiresConnectorControl.class);
tested.setControl(connectorControl);
final Object wcv = tested.hideControlPoints();
assertEquals(wcv, tested);
verify(connectorControl, times(1)).hideControlPoints();
verify(connectorControl, never()).showControlPoints();
}
use of com.ait.lienzo.client.core.shape.wires.handlers.WiresConnectorControl in project kie-wb-common by kiegroup.
the class WiresConnectorViewTest method testConnectionControl.
@Test
public void testConnectionControl() {
final WiresConnectorControl connectorControl = mock(WiresConnectorControl.class);
final Object wcv = tested.setControl(connectorControl);
assertEquals(wcv, tested);
assertEquals(connectorControl, tested.getControl());
}
use of com.ait.lienzo.client.core.shape.wires.handlers.WiresConnectorControl in project kie-wb-common by kiegroup.
the class WiresConnectorViewTest method testShowControlPointsNotSupported.
@Test(expected = UnsupportedOperationException.class)
public void testShowControlPointsNotSupported() {
final WiresConnectorControl connectorControl = mock(WiresConnectorControl.class);
tested.setControl(connectorControl);
tested.showControlPoints(HasControlPoints.ControlPointType.RESIZE);
}
use of com.ait.lienzo.client.core.shape.wires.handlers.WiresConnectorControl in project kie-wb-common by kiegroup.
the class WiresCanvasView method addShape.
@Override
public WiresCanvas.View addShape(final ShapeView<?> shapeView) {
if (WiresUtils.isWiresShape(shapeView)) {
WiresShape wiresShape = (WiresShape) shapeView;
wiresManager.register(wiresShape);
wiresManager.getMagnetManager().createMagnets(wiresShape, getMagnetCardinals());
WiresUtils.assertShapeGroup(wiresShape.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID);
} else if (WiresUtils.isWiresConnector(shapeView)) {
WiresConnector wiresConnector = (WiresConnector) shapeView;
final WiresConnectorControl connectorControl = wiresManager.register(wiresConnector);
if (shapeView instanceof WiresConnectorView) {
((WiresConnectorView) shapeView).setControl(connectorControl);
}
WiresUtils.assertShapeGroup(wiresConnector.getGroup(), WiresCanvas.WIRES_CANVAS_GROUP_ID);
} else {
super.addShape(shapeView);
}
return this;
}
use of com.ait.lienzo.client.core.shape.wires.handlers.WiresConnectorControl in project kie-wb-common by kiegroup.
the class CaseManagementControlFactoryTest method testControls.
@Test
public void testControls() {
WiresShapeControl shapeControl = factory.newShapeControl(shape, wiresManager);
assertNotNull(shapeControl);
assertTrue(shapeControl instanceof CaseManagementShapeControl);
WiresConnectorControl connectorControl = factory.newConnectorControl(wiresConnector, wiresManager);
assertNotNull(connectorControl);
assertTrue(connectorControl instanceof WiresConnectorControlImpl);
WiresConnectionControl connectionControl = factory.newConnectionControl(wiresConnector, true, wiresManager);
assertNotNull(connectionControl);
assertTrue(connectionControl instanceof WiresConnectionControlImpl);
}
Aggregations