@Test @SuppressWarnings("unchecked") public void testStart() { CanvasCommand<AbstractCanvasHandler> command = mock(CanvasCommand.class); doReturn(command).when(commandFactory).addConnector(eq(sourceNode), eq(edge), any(MagnetConnection.class), eq(SHAPE_SET_ID)); double x = 1d; double y = 2d; tested.init(); tested.start(x, y); verify(proxy, times(1)).start(eq(x), eq(y)); EdgeShape edgeShape = view.getShapeBuilder().get(); assertEquals(connector, edgeShape); verify(proxy, times(1)).execute(eq(command)); }
public ConnectorProxy start(final AbstractMouseEvent event) { start(event.getX(), event.getY()); return this; }
ConnectorProxy implements ShapeProxy { public ConnectorProxy start(final AbstractMouseEvent event) { start(event.getX(), event.getY()); return this; } }
ConnectorProxy implements ShapeProxy { public ConnectorProxy start(final AbstractMouseEvent event) { start(event.getX(), event.getY()); return this; } @Inject  ConnectorProxy(final ElementProxy proxy,
                          final ShapeProxyView<EdgeShape> view); }
ConnectorProxy implements ShapeProxy { public ConnectorProxy start(final AbstractMouseEvent event) { start(event.getX(), event.getY()); return this; } @Inject  ConnectorProxy(final ElementProxy proxy,
                          final ShapeProxyView<EdgeShape> view); @PostConstruct void init(); ConnectorProxy setCanvasHandler(final AbstractCanvasHandler canvasHandler); ConnectorProxy setEdge(final Edge<? extends ViewConnector<?>, Node> edge); ConnectorProxy setSourceNode(final Node<? extends View<?>, Edge> sourceNode); ConnectorProxy start(final AbstractMouseEvent event); @Override void start(final double x,
                      final double y); @Override void destroy(); }
ConnectorProxy implements ShapeProxy { public ConnectorProxy start(final AbstractMouseEvent event) { start(event.getX(), event.getY()); return this; } @Inject  ConnectorProxy(final ElementProxy proxy,
                          final ShapeProxyView<EdgeShape> view); @PostConstruct void init(); ConnectorProxy setCanvasHandler(final AbstractCanvasHandler canvasHandler); ConnectorProxy setEdge(final Edge<? extends ViewConnector<?>, Node> edge); ConnectorProxy setSourceNode(final Node<? extends View<?>, Edge> sourceNode); ConnectorProxy start(final AbstractMouseEvent event); @Override void start(final double x,
                      final double y); @Override void destroy();  }