@Test @SuppressWarnings("unchecked") public void testDeregister() { tested.init(canvasHandler); tested.register(element); tested.deregister(element); verify(selectionControl, times(1)).deregister(eq(element)); verify(shapeViewHandlers, times(1)).removeHandler(any(ViewHandler.class)); assertTrue(tested.getHandlers().isEmpty()); }
protected void deregister(final String uuid) { final Shape shape = getSelectionControl().getCanvas().getShape(uuid); final ViewHandler<?> handler = handlers.get(uuid); doDeregisterHandler(shape, handler); }
LienzoSelectionControl extends AbstractSelectionControl<H> { protected void deregister(final String uuid) { final Shape shape = getSelectionControl().getCanvas().getShape(uuid); final ViewHandler<?> handler = handlers.get(uuid); doDeregisterHandler(shape, handler); } }
LienzoSelectionControl extends AbstractSelectionControl<H> { protected void deregister(final String uuid) { final Shape shape = getSelectionControl().getCanvas().getShape(uuid); final ViewHandler<?> handler = handlers.get(uuid); doDeregisterHandler(shape, handler); } @Inject  LienzoSelectionControl(final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                  final Event<CanvasClearSelectionEvent> clearSelectionEvent);   LienzoSelectionControl(final MapSelectionControl<H> selectionControl,
                           final Event<CanvasSelectionEvent> canvasSelectionEvent,
                           final Event<CanvasClearSelectionEvent> clearSelectionEvent); }
LienzoSelectionControl extends AbstractSelectionControl<H> { protected void deregister(final String uuid) { final Shape shape = getSelectionControl().getCanvas().getShape(uuid); final ViewHandler<?> handler = handlers.get(uuid); doDeregisterHandler(shape, handler); } @Inject  LienzoSelectionControl(final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                  final Event<CanvasClearSelectionEvent> clearSelectionEvent);   LienzoSelectionControl(final MapSelectionControl<H> selectionControl,
                           final Event<CanvasSelectionEvent> canvasSelectionEvent,
                           final Event<CanvasClearSelectionEvent> clearSelectionEvent);  }
LienzoSelectionControl extends AbstractSelectionControl<H> { protected void deregister(final String uuid) { final Shape shape = getSelectionControl().getCanvas().getShape(uuid); final ViewHandler<?> handler = handlers.get(uuid); doDeregisterHandler(shape, handler); } @Inject  LienzoSelectionControl(final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                  final Event<CanvasClearSelectionEvent> clearSelectionEvent);   LienzoSelectionControl(final MapSelectionControl<H> selectionControl,
                           final Event<CanvasSelectionEvent> canvasSelectionEvent,
                           final Event<CanvasClearSelectionEvent> clearSelectionEvent);   }