/** * Gets a modified version of <code>font</code> * @param font some font to modify * @return the font that should be used, can be <code>null</code> */ public Font font( Font font ){ FontModifier modifier = value(); if( modifier == null ) return null; return modifier.modify( font ); } }
/** * Gets a modified version of <code>font</code> * @param font some font to modify * @return the font that should be used, can be <code>null</code> */ public Font font( Font font ){ FontModifier modifier = value(); if( modifier == null ) return null; return modifier.modify( font ); } }
private void updateFont(){ try{ onFontUpdate = true; component.setFont( original ); Font base = component.getFont(); Font modified; if( base == null || modifier == null ){ modified = original; } else{ modified = modifier.modify( base ); } component.setFont( modified ); } finally{ onFontUpdate = false; } } }