@Test public void testMoveSelectionShapeToTop() { final LienzoMultipleSelectionControl.CursoredSelectionShapeProvider ssp = mock(LienzoMultipleSelectionControl.CursoredSelectionShapeProvider.class); tested = new LienzoMultipleSelectionControl<>(selectionControl, canvasSelectionEvent, clearSelectionEvent, ssp); tested.init(canvasHandler); tested.onCanvasSelection(new CanvasSelectionEvent(canvasHandler, Collections.emptyList())); verify(ssp, times(1)).moveShapeToTop(); }
void onCanvasSelection(final @Observes CanvasSelectionEvent event) { checkNotNull("event", event); if (Objects.equals(getCanvasHandler(), event.getCanvasHandler())) { if (event.getIdentifiers().size() == 1) { onClearSelection(); } selectionShapeProvider.moveShapeToTop(); } }
LienzoMultipleSelectionControl extends AbstractSelectionControl<H> { void onCanvasSelection(final @Observes CanvasSelectionEvent event) { checkNotNull("event", event); if (Objects.equals(getCanvasHandler(), event.getCanvasHandler())) { if (event.getIdentifiers().size() == 1) { onClearSelection(); } selectionShapeProvider.moveShapeToTop(); } } }
LienzoMultipleSelectionControl extends AbstractSelectionControl<H> { void onCanvasSelection(final @Observes CanvasSelectionEvent event) { checkNotNull("event", event); if (Objects.equals(getCanvasHandler(), event.getCanvasHandler())) { if (event.getIdentifiers().size() == 1) { onClearSelection(); } selectionShapeProvider.moveShapeToTop(); } } @Inject  LienzoMultipleSelectionControl(final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                          final Event<CanvasClearSelectionEvent> clearSelectionEvent);   LienzoMultipleSelectionControl(final MapSelectionControl<H> selectionControl,
                                   final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                   final Event<CanvasClearSelectionEvent> clearSelectionEvent,
                                   final CursoredSelectionShapeProvider selectionShapeProvider); }
LienzoMultipleSelectionControl extends AbstractSelectionControl<H> { void onCanvasSelection(final @Observes CanvasSelectionEvent event) { checkNotNull("event", event); if (Objects.equals(getCanvasHandler(), event.getCanvasHandler())) { if (event.getIdentifiers().size() == 1) { onClearSelection(); } selectionShapeProvider.moveShapeToTop(); } } @Inject  LienzoMultipleSelectionControl(final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                          final Event<CanvasClearSelectionEvent> clearSelectionEvent);   LienzoMultipleSelectionControl(final MapSelectionControl<H> selectionControl,
                                   final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                   final Event<CanvasClearSelectionEvent> clearSelectionEvent,
                                   final CursoredSelectionShapeProvider selectionShapeProvider);  }
LienzoMultipleSelectionControl extends AbstractSelectionControl<H> { void onCanvasSelection(final @Observes CanvasSelectionEvent event) { checkNotNull("event", event); if (Objects.equals(getCanvasHandler(), event.getCanvasHandler())) { if (event.getIdentifiers().size() == 1) { onClearSelection(); } selectionShapeProvider.moveShapeToTop(); } } @Inject  LienzoMultipleSelectionControl(final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                          final Event<CanvasClearSelectionEvent> clearSelectionEvent);   LienzoMultipleSelectionControl(final MapSelectionControl<H> selectionControl,
                                   final Event<CanvasSelectionEvent> canvasSelectionEvent,
                                   final Event<CanvasClearSelectionEvent> clearSelectionEvent,
                                   final CursoredSelectionShapeProvider selectionShapeProvider);   }