@Test public void testSetStyleSheet() { StyleSheet style = null; wrapper.setStyleSheet( style ); verify( sparkline, never() ).setLastColor( any( Color.class ) ); verify( sparkline, never() ).setHighColor( any( Color.class ) ); verify( sparkline, never() ).setBackground( any( Color.class ) ); verify( sparkline, never() ).setColor( any( Color.class ) ); style = mock( StyleSheet.class ); doReturn( Color.BLACK ).when( style ).getStyleProperty( ElementStyleKeys.BACKGROUND_COLOR ); doReturn( Color.BLUE ).when( style ).getStyleProperty( ElementStyleKeys.PAINT ); doReturn( Color.RED ).when( style ).getStyleProperty( SparklineStyleKeys.LAST_COLOR ); doReturn( Color.GRAY ).when( style ).getStyleProperty( SparklineStyleKeys.HIGH_COLOR ); wrapper.setStyleSheet( style ); verify( sparkline ).setLastColor( Color.RED ); verify( sparkline ).setHighColor( Color.GRAY ); verify( sparkline ).setBackground( Color.BLACK ); verify( sparkline ).setColor( Color.BLUE ); }
public void setStyleSheet( final StyleSheet style ) { if ( style != null ) { sparkline.setBackground( (Color) style.getStyleProperty( ElementStyleKeys.BACKGROUND_COLOR ) ); sparkline.setColor( (Color) style.getStyleProperty( ElementStyleKeys.PAINT ) ); sparkline.setLastColor( (Color) style.getStyleProperty( SparklineStyleKeys.LAST_COLOR ) ); sparkline.setHighColor( (Color) style.getStyleProperty( SparklineStyleKeys.HIGH_COLOR ) ); } }
BarSparklinesWrapper extends DrawableWrapper implements ReportDrawable { public void setStyleSheet( final StyleSheet style ) { if ( style != null ) { sparkline.setBackground( (Color) style.getStyleProperty( ElementStyleKeys.BACKGROUND_COLOR ) ); sparkline.setColor( (Color) style.getStyleProperty( ElementStyleKeys.PAINT ) ); sparkline.setLastColor( (Color) style.getStyleProperty( SparklineStyleKeys.LAST_COLOR ) ); sparkline.setHighColor( (Color) style.getStyleProperty( SparklineStyleKeys.HIGH_COLOR ) ); } } }
BarSparklinesWrapper extends DrawableWrapper implements ReportDrawable { public void setStyleSheet( final StyleSheet style ) { if ( style != null ) { sparkline.setBackground( (Color) style.getStyleProperty( ElementStyleKeys.BACKGROUND_COLOR ) ); sparkline.setColor( (Color) style.getStyleProperty( ElementStyleKeys.PAINT ) ); sparkline.setLastColor( (Color) style.getStyleProperty( SparklineStyleKeys.LAST_COLOR ) ); sparkline.setHighColor( (Color) style.getStyleProperty( SparklineStyleKeys.HIGH_COLOR ) ); } } BarSparklinesWrapper( final BarGraphDrawable sparkline ); }
BarSparklinesWrapper extends DrawableWrapper implements ReportDrawable { public void setStyleSheet( final StyleSheet style ) { if ( style != null ) { sparkline.setBackground( (Color) style.getStyleProperty( ElementStyleKeys.BACKGROUND_COLOR ) ); sparkline.setColor( (Color) style.getStyleProperty( ElementStyleKeys.PAINT ) ); sparkline.setLastColor( (Color) style.getStyleProperty( SparklineStyleKeys.LAST_COLOR ) ); sparkline.setHighColor( (Color) style.getStyleProperty( SparklineStyleKeys.HIGH_COLOR ) ); } } BarSparklinesWrapper( final BarGraphDrawable sparkline ); void setConfiguration( final Configuration config ); void setStyleSheet( final StyleSheet style ); void setResourceBundleFactory( final ResourceBundleFactory bundleFactory ); ImageMap getImageMap( final Rectangle2D bounds ); boolean isPreserveAspectRatio(); Dimension getPreferredSize(); void draw( final Graphics2D g2, final Rectangle2D bounds ); }
BarSparklinesWrapper extends DrawableWrapper implements ReportDrawable { public void setStyleSheet( final StyleSheet style ) { if ( style != null ) { sparkline.setBackground( (Color) style.getStyleProperty( ElementStyleKeys.BACKGROUND_COLOR ) ); sparkline.setColor( (Color) style.getStyleProperty( ElementStyleKeys.PAINT ) ); sparkline.setLastColor( (Color) style.getStyleProperty( SparklineStyleKeys.LAST_COLOR ) ); sparkline.setHighColor( (Color) style.getStyleProperty( SparklineStyleKeys.HIGH_COLOR ) ); } } BarSparklinesWrapper( final BarGraphDrawable sparkline ); void setConfiguration( final Configuration config ); void setStyleSheet( final StyleSheet style ); void setResourceBundleFactory( final ResourceBundleFactory bundleFactory ); ImageMap getImageMap( final Rectangle2D bounds ); boolean isPreserveAspectRatio(); Dimension getPreferredSize(); void draw( final Graphics2D g2, final Rectangle2D bounds );  }