@Test public void testApplyStyle() { ElementStyleSheet style = mock( ElementStyleSheet.class ); barcodeElemFactory.applyStyle( style ); verify( style, never() ).setStyleProperty( any( StyleKey.class ), anyObject() ); barcodeElemFactory.setFontName( "Times New Roman" ); barcodeElemFactory.setFontSize( 14 ); barcodeElemFactory.setBold( true ); barcodeElemFactory.setItalic( true ); barcodeElemFactory.applyStyle( style ); verify( style ).setStyleProperty( TextStyleKeys.FONT, barcodeElemFactory.getFontName() ); verify( style ).setStyleProperty( TextStyleKeys.FONTSIZE, barcodeElemFactory.getFontSize() ); verify( style ).setStyleProperty( TextStyleKeys.BOLD, barcodeElemFactory.getBold() ); verify( style ).setStyleProperty( TextStyleKeys.ITALIC, barcodeElemFactory.getItalic() ); }
protected void applyStyle( ElementStyleSheet style ) { super.applyStyle( style ); if ( fontName != null ) { style.setStyleProperty( TextStyleKeys.FONT, getFontName() ); } if ( fontSize != null ) { style.setStyleProperty( TextStyleKeys.FONTSIZE, getFontSize() ); } if ( bold != null ) { style.setStyleProperty( TextStyleKeys.BOLD, getBold() ); } if ( italic != null ) { style.setStyleProperty( TextStyleKeys.ITALIC, getItalic() ); } }
BarcodeElementFactory extends AbstractContentElementFactory { protected void applyStyle( ElementStyleSheet style ) { super.applyStyle( style ); if ( fontName != null ) { style.setStyleProperty( TextStyleKeys.FONT, getFontName() ); } if ( fontSize != null ) { style.setStyleProperty( TextStyleKeys.FONTSIZE, getFontSize() ); } if ( bold != null ) { style.setStyleProperty( TextStyleKeys.BOLD, getBold() ); } if ( italic != null ) { style.setStyleProperty( TextStyleKeys.ITALIC, getItalic() ); } } }
BarcodeElementFactory extends AbstractContentElementFactory { protected void applyStyle( ElementStyleSheet style ) { super.applyStyle( style ); if ( fontName != null ) { style.setStyleProperty( TextStyleKeys.FONT, getFontName() ); } if ( fontSize != null ) { style.setStyleProperty( TextStyleKeys.FONTSIZE, getFontSize() ); } if ( bold != null ) { style.setStyleProperty( TextStyleKeys.BOLD, getBold() ); } if ( italic != null ) { style.setStyleProperty( TextStyleKeys.ITALIC, getItalic() ); } } BarcodeElementFactory(); }
BarcodeElementFactory extends AbstractContentElementFactory { protected void applyStyle( ElementStyleSheet style ) { super.applyStyle( style ); if ( fontName != null ) { style.setStyleProperty( TextStyleKeys.FONT, getFontName() ); } if ( fontSize != null ) { style.setStyleProperty( TextStyleKeys.FONTSIZE, getFontSize() ); } if ( bold != null ) { style.setStyleProperty( TextStyleKeys.BOLD, getBold() ); } if ( italic != null ) { style.setStyleProperty( TextStyleKeys.ITALIC, getItalic() ); } } BarcodeElementFactory(); String getFormula(); void setFormula( String formula ); Object getContent(); void setContent( Object content ); String getFieldname(); void setFieldname( String fieldname ); Object getNullValue(); void setNullValue( Object nullValue ); String getType(); void setType( String type ); Integer getBarHeight(); void setBarHeight( Integer barHeight ); Integer getBarWidth(); void setBarWidth( Integer barWidth ); Boolean getChecksum(); void setChecksum( Boolean checksum ); Boolean getShowText(); void setShowText( Boolean showText ); String getFontName(); void setFontName( String fontName ); Integer getFontSize(); void setFontSize( Integer fontSize ); Boolean getBold(); void setBold( Boolean bold ); Boolean getItalic(); void setItalic( Boolean italic ); Element createElement(); }
BarcodeElementFactory extends AbstractContentElementFactory { protected void applyStyle( ElementStyleSheet style ) { super.applyStyle( style ); if ( fontName != null ) { style.setStyleProperty( TextStyleKeys.FONT, getFontName() ); } if ( fontSize != null ) { style.setStyleProperty( TextStyleKeys.FONTSIZE, getFontSize() ); } if ( bold != null ) { style.setStyleProperty( TextStyleKeys.BOLD, getBold() ); } if ( italic != null ) { style.setStyleProperty( TextStyleKeys.ITALIC, getItalic() ); } } BarcodeElementFactory(); String getFormula(); void setFormula( String formula ); Object getContent(); void setContent( Object content ); String getFieldname(); void setFieldname( String fieldname ); Object getNullValue(); void setNullValue( Object nullValue ); String getType(); void setType( String type ); Integer getBarHeight(); void setBarHeight( Integer barHeight ); Integer getBarWidth(); void setBarWidth( Integer barWidth ); Boolean getChecksum(); void setChecksum( Boolean checksum ); Boolean getShowText(); void setShowText( Boolean showText ); String getFontName(); void setFontName( String fontName ); Integer getFontSize(); void setFontSize( Integer fontSize ); Boolean getBold(); void setBold( Boolean bold ); Boolean getItalic(); void setItalic( Boolean italic ); Element createElement();  }