@Test public void testConfigure() { PreviewPane reportPane = mock( PreviewPane.class ); doReturn( 5.5 ).when( reportPane ).getZoom(); doReturn( new double[] { 5.0, 5.5, 10.4, 15.0 } ).when( reportPane ).getZoomFactors(); boolean result = plugin.configure( reportPane ); verify( reportPane ).setZoom( 10.4 ); assertThat( result, is( equalTo( true ) ) ); }
public boolean configure( final PreviewPane reportPane ) { final double nextZoomIn = PreviewPaneUtilities.getNextZoomIn( reportPane.getZoom(), reportPane.getZoomFactors() ); if ( nextZoomIn == 0 ) { return false; } reportPane.setZoom( nextZoomIn ); return true; }
ZoomInActionPlugin extends AbstractActionPlugin implements ControlActionPlugin { public boolean configure( final PreviewPane reportPane ) { final double nextZoomIn = PreviewPaneUtilities.getNextZoomIn( reportPane.getZoom(), reportPane.getZoomFactors() ); if ( nextZoomIn == 0 ) { return false; } reportPane.setZoom( nextZoomIn ); return true; } }
ZoomInActionPlugin extends AbstractActionPlugin implements ControlActionPlugin { public boolean configure( final PreviewPane reportPane ) { final double nextZoomIn = PreviewPaneUtilities.getNextZoomIn( reportPane.getZoom(), reportPane.getZoomFactors() ); if ( nextZoomIn == 0 ) { return false; } reportPane.setZoom( nextZoomIn ); return true; } ZoomInActionPlugin(); }
ZoomInActionPlugin extends AbstractActionPlugin implements ControlActionPlugin { public boolean configure( final PreviewPane reportPane ) { final double nextZoomIn = PreviewPaneUtilities.getNextZoomIn( reportPane.getZoom(), reportPane.getZoomFactors() ); if ( nextZoomIn == 0 ) { return false; } reportPane.setZoom( nextZoomIn ); return true; } ZoomInActionPlugin(); void deinitialize( final SwingGuiContext swingGuiContext ); boolean initialize( final SwingGuiContext context ); String getDisplayName(); String getShortDescription(); Icon getSmallIcon(); Icon getLargeIcon(); KeyStroke getAcceleratorKey(); Integer getMnemonicKey(); boolean configure( final PreviewPane reportPane ); }
ZoomInActionPlugin extends AbstractActionPlugin implements ControlActionPlugin { public boolean configure( final PreviewPane reportPane ) { final double nextZoomIn = PreviewPaneUtilities.getNextZoomIn( reportPane.getZoom(), reportPane.getZoomFactors() ); if ( nextZoomIn == 0 ) { return false; } reportPane.setZoom( nextZoomIn ); return true; } ZoomInActionPlugin(); void deinitialize( final SwingGuiContext swingGuiContext ); boolean initialize( final SwingGuiContext context ); String getDisplayName(); String getShortDescription(); Icon getSmallIcon(); Icon getLargeIcon(); KeyStroke getAcceleratorKey(); Integer getMnemonicKey(); boolean configure( final PreviewPane reportPane );  }