@Test public void testApplyStyle() { ElementStyleSheet style = mock( ElementStyleSheet.class ); elemFactory.applyStyle( style ); verify( style, never() ).setStyleProperty( any( StyleKey.class ), anyObject() ); elemFactory.setHighColor( Color.BLUE ); elemFactory.setLastColor( Color.RED ); elemFactory.applyStyle( style ); verify( style ).setStyleProperty( SparklineStyleKeys.HIGH_COLOR, elemFactory.getHighColor() ); verify( style ).setStyleProperty( SparklineStyleKeys.LAST_COLOR, elemFactory.getLastColor() ); }
protected void applyStyle( final ElementStyleSheet style ) { super.applyStyle( style ); if ( highColor != null ) { style.setStyleProperty( SparklineStyleKeys.HIGH_COLOR, getHighColor() ); } if ( lastColor != null ) { style.setStyleProperty( SparklineStyleKeys.LAST_COLOR, getLastColor() ); } }
BarSparklineElementFactory extends AbstractContentElementFactory { protected void applyStyle( final ElementStyleSheet style ) { super.applyStyle( style ); if ( highColor != null ) { style.setStyleProperty( SparklineStyleKeys.HIGH_COLOR, getHighColor() ); } if ( lastColor != null ) { style.setStyleProperty( SparklineStyleKeys.LAST_COLOR, getLastColor() ); } } }
BarSparklineElementFactory extends AbstractContentElementFactory { protected void applyStyle( final ElementStyleSheet style ) { super.applyStyle( style ); if ( highColor != null ) { style.setStyleProperty( SparklineStyleKeys.HIGH_COLOR, getHighColor() ); } if ( lastColor != null ) { style.setStyleProperty( SparklineStyleKeys.LAST_COLOR, getLastColor() ); } } BarSparklineElementFactory(); }
BarSparklineElementFactory extends AbstractContentElementFactory { protected void applyStyle( final ElementStyleSheet style ) { super.applyStyle( style ); if ( highColor != null ) { style.setStyleProperty( SparklineStyleKeys.HIGH_COLOR, getHighColor() ); } if ( lastColor != null ) { style.setStyleProperty( SparklineStyleKeys.LAST_COLOR, getLastColor() ); } } BarSparklineElementFactory(); Object getContent(); void setContent( final Object content ); Object getNullValue(); void setNullValue( final Object nullValue ); String getFormula(); void setFormula( final String formula ); Color getHighColor(); void setHighColor( final Color highColor ); Color getLastColor(); void setLastColor( final Color lastColor ); Integer getSpacing(); void setSpacing( final Integer spacing ); String getFieldname(); void setFieldname( final String fieldname ); Element createElement(); }
BarSparklineElementFactory extends AbstractContentElementFactory { protected void applyStyle( final ElementStyleSheet style ) { super.applyStyle( style ); if ( highColor != null ) { style.setStyleProperty( SparklineStyleKeys.HIGH_COLOR, getHighColor() ); } if ( lastColor != null ) { style.setStyleProperty( SparklineStyleKeys.LAST_COLOR, getLastColor() ); } } BarSparklineElementFactory(); Object getContent(); void setContent( final Object content ); Object getNullValue(); void setNullValue( final Object nullValue ); String getFormula(); void setFormula( final String formula ); Color getHighColor(); void setHighColor( final Color highColor ); Color getLastColor(); void setLastColor( final Color lastColor ); Integer getSpacing(); void setSpacing( final Integer spacing ); String getFieldname(); void setFieldname( final String fieldname ); Element createElement();  }