by rustem » Thu Jul 16, 2009 12:16 pm
Thanks for promt reply.
I do not use jide.fontSize property (shoud I?)
I use folowing to change font globally:
I wander if i need to instrust Jide components to get thier properties from UIManager defaults?
Thanks.
...
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
setGloabalFontSize(1.0f);
...
private static void setGloabalFontSize(float scale) {
UIDefaults defaults = UIManager.getDefaults();
Enumeration<Object> keys = defaults.keys();
while (keys.hasMoreElements()) {
Object key = keys.nextElement();
Object value = defaults.get(key);
if (value != null && value instanceof Font) {
UIManager.put(key, null);
Font font = UIManager.getFont(key);
if (font != null) {
float size = font.getSize2D();
Font newFont = font.deriveFont(size + scale);
UIManager.put(key, new FontUIResource(newFont));
}
}
}
}