@Test public void testPropertyChange() { AbstractActionPlugin actionPlugin = mock( AbstractActionPlugin.class ); PropertyChangeEvent evt = mock( PropertyChangeEvent.class ); PaginatedUpdateListener listener = new PaginatedUpdateListener( actionPlugin ); doReturn( "test" ).when( evt ).getPropertyName(); doReturn( true ).when( evt ).getNewValue(); listener.propertyChange( evt ); verify( actionPlugin, never() ).setEnabled( anyBoolean() ); doReturn( PreviewPane.PAGINATED_PROPERTY ).when( evt ).getPropertyName(); doReturn( false ).when( evt ).getNewValue(); listener.propertyChange( evt ); verify( actionPlugin ).setEnabled( false ); doReturn( true ).when( evt ).getNewValue(); listener.propertyChange( evt ); verify( actionPlugin ).setEnabled( true ); }
public void propertyChange( final PropertyChangeEvent evt ) { if ( PreviewPane.PAGINATED_PROPERTY.equals( evt.getPropertyName() ) == false ) { return; } actionPlugin.setEnabled( Boolean.TRUE.equals( evt.getNewValue() ) ); }
PaginatedUpdateListener implements PropertyChangeListener { public void propertyChange( final PropertyChangeEvent evt ) { if ( PreviewPane.PAGINATED_PROPERTY.equals( evt.getPropertyName() ) == false ) { return; } actionPlugin.setEnabled( Boolean.TRUE.equals( evt.getNewValue() ) ); } }
PaginatedUpdateListener implements PropertyChangeListener { public void propertyChange( final PropertyChangeEvent evt ) { if ( PreviewPane.PAGINATED_PROPERTY.equals( evt.getPropertyName() ) == false ) { return; } actionPlugin.setEnabled( Boolean.TRUE.equals( evt.getNewValue() ) ); } PaginatedUpdateListener( final AbstractActionPlugin actionPlugin ); }
PaginatedUpdateListener implements PropertyChangeListener { public void propertyChange( final PropertyChangeEvent evt ) { if ( PreviewPane.PAGINATED_PROPERTY.equals( evt.getPropertyName() ) == false ) { return; } actionPlugin.setEnabled( Boolean.TRUE.equals( evt.getNewValue() ) ); } PaginatedUpdateListener( final AbstractActionPlugin actionPlugin ); void propertyChange( final PropertyChangeEvent evt ); }
PaginatedUpdateListener implements PropertyChangeListener { public void propertyChange( final PropertyChangeEvent evt ) { if ( PreviewPane.PAGINATED_PROPERTY.equals( evt.getPropertyName() ) == false ) { return; } actionPlugin.setEnabled( Boolean.TRUE.equals( evt.getNewValue() ) ); } PaginatedUpdateListener( final AbstractActionPlugin actionPlugin ); void propertyChange( final PropertyChangeEvent evt );  }