MetalFontDesktopPropertypublic class MetalFontDesktopProperty extends com.sun.java.swing.plaf.windows.DesktopProperty DesktopProperty that only uses font height in configuring font. This
is only used on Windows. |
Fields Summary |
---|
private static final String[] | propertyMappingMaps from metal font theme type as defined in MetalTheme
to the corresponding desktop property name. | private int | typeCorresponds to a MetalTheme font type. |
Constructors Summary |
---|
MetalFontDesktopProperty(int type)Creates a MetalFontDesktopProperty. The key used to lookup the
desktop property is determined from the type of font.
this(propertyMapping[type], Toolkit.getDefaultToolkit(), type);
| MetalFontDesktopProperty(String key, Toolkit kit, int type)Creates a MetalFontDesktopProperty.
super(key, null, kit);
this.type = type;
|
Methods Summary |
---|
protected java.lang.Object | configureValue(java.lang.Object value)Overriden to create a Font with the size coming from the desktop
and the style and name coming from DefaultMetalTheme.
if (value instanceof Integer) {
value = new Font(DefaultMetalTheme.getDefaultFontName(type),
DefaultMetalTheme.getDefaultFontStyle(type),
((Integer)value).intValue());
}
return super.configureValue(value);
| protected java.lang.Object | getDefaultValue()Returns the default font.
return new Font(DefaultMetalTheme.getDefaultFontName(type),
DefaultMetalTheme.getDefaultFontStyle(type),
DefaultMetalTheme.getDefaultFontSize(type));
|
|