@Test public void testOnCanvasLostFocusEvent() { CanvasLostFocusEvent event = new CanvasLostFocusEvent(canvas); tested.onCanvasLostFocusEvent(event); verify(mediators, times(1)).disable(); verify(mediators, never()).enable(); }
void onCanvasLostFocusEvent(final @Observes CanvasLostFocusEvent lostFocusEvent) { if (null != canvas && canvas.equals(lostFocusEvent.getCanvas())) { mediators.disable(); } }
LienzoMediatorsControl extends AbstractCanvasControl<C> implements MediatorsControl<C> { void onCanvasLostFocusEvent(final @Observes CanvasLostFocusEvent lostFocusEvent) { if (null != canvas && canvas.equals(lostFocusEvent.getCanvas())) { mediators.disable(); } } }
LienzoMediatorsControl extends AbstractCanvasControl<C> implements MediatorsControl<C> { void onCanvasLostFocusEvent(final @Observes CanvasLostFocusEvent lostFocusEvent) { if (null != canvas && canvas.equals(lostFocusEvent.getCanvas())) { mediators.disable(); } } @Inject  LienzoMediatorsControl(final LienzoPanelMediators mediators); }
LienzoMediatorsControl extends AbstractCanvasControl<C> implements MediatorsControl<C> { void onCanvasLostFocusEvent(final @Observes CanvasLostFocusEvent lostFocusEvent) { if (null != canvas && canvas.equals(lostFocusEvent.getCanvas())) { mediators.disable(); } } @Inject  LienzoMediatorsControl(final LienzoPanelMediators mediators); @Override MediatorsControl<C> setMinScale(final double minScale); @Override MediatorsControl<C> setMaxScale(final double maxScale); @Override MediatorsControl<C> setZoomFactor(final double factor); @Override MediatorsControl<C> scale(final double factor); @Override MediatorsControl<C> scale(final double sx,
                                     final double sy); @Override MediatorsControl<C> translate(final double tx,
                                         final double ty); }
LienzoMediatorsControl extends AbstractCanvasControl<C> implements MediatorsControl<C> { void onCanvasLostFocusEvent(final @Observes CanvasLostFocusEvent lostFocusEvent) { if (null != canvas && canvas.equals(lostFocusEvent.getCanvas())) { mediators.disable(); } } @Inject  LienzoMediatorsControl(final LienzoPanelMediators mediators); @Override MediatorsControl<C> setMinScale(final double minScale); @Override MediatorsControl<C> setMaxScale(final double maxScale); @Override MediatorsControl<C> setZoomFactor(final double factor); @Override MediatorsControl<C> scale(final double factor); @Override MediatorsControl<C> scale(final double sx,
                                     final double sy); @Override MediatorsControl<C> translate(final double tx,
                                         final double ty);  }