Fields Summary |
---|
private static final boolean | PLAIN_FONTSWhether or not fonts should be plain. This is only used if
the defaults property 'swing.boldMetal' == "false". |
private static final String[] | fontNamesNames of the fonts to use. |
private static final int[] | fontStylesStyles for the fonts. This is ignored if the defaults property
swing.boldMetal is false, or PLAIN_FONTS is true. |
private static final int[] | fontSizesSizes for the fonts. |
private static final String[] | defaultNamesSystem property names used to look up fonts. |
private static final ColorUIResource | primary1 |
private static final ColorUIResource | primary2 |
private static final ColorUIResource | primary3 |
private static final ColorUIResource | secondary1 |
private static final ColorUIResource | secondary2 |
private static final ColorUIResource | secondary3 |
private FontDelegate | fontDelegate |
Methods Summary |
---|
public javax.swing.plaf.FontUIResource | getControlTextFont()Returns the control text font. This returns Dialog, 12pt. If
plain fonts have been enabled as described in
font style, the font style is plain. Otherwise the font style is
bold.
return getFont(CONTROL_TEXT_FONT);
|
static java.lang.String | getDefaultFontName(int key)Returns the ideal font name for the font identified by key.
return fontNames[key];
|
static int | getDefaultFontSize(int key)Returns the ideal font size for the font identified by key.
return fontSizes[key];
|
static int | getDefaultFontStyle(int key)Returns the ideal font style for the font identified by key.
if (key != WINDOW_TITLE_FONT) {
Object boldMetal = null;
if (AppContext.getAppContext().get(
SwingUtilities2.LAF_STATE_KEY) != null) {
// Only access the boldMetal key if a look and feel has
// been loaded, otherwise we'll trigger loading the look
// and feel.
boldMetal = UIManager.get("swing.boldMetal");
}
if (boldMetal != null) {
if (Boolean.FALSE.equals(boldMetal)) {
return Font.PLAIN;
}
}
else if (PLAIN_FONTS) {
return Font.PLAIN;
}
}
return fontStyles[key];
|
static java.lang.String | getDefaultPropertyName(int key)Returns the default used to look up the specified font.
return defaultNames[key];
|
private javax.swing.plaf.FontUIResource | getFont(int key)
return fontDelegate.getFont(key);
|
public javax.swing.plaf.FontUIResource | getMenuTextFont()Returns the menu text font. This returns Dialog, 12pt. If
plain fonts have been enabled as described in
font style, the font style is plain. Otherwise the font style is
bold.
return getFont(MENU_TEXT_FONT);
|
public java.lang.String | getName()Returns the name of this theme. This returns {@code "Steel"}.
return "Steel";
|
protected javax.swing.plaf.ColorUIResource | getPrimary1()Returns the primary 1 color. This returns a color with rgb values
of 102, 102, and 153, respectively. return primary1;
|
protected javax.swing.plaf.ColorUIResource | getPrimary2()Returns the primary 2 color. This returns a color with rgb values
of 153, 153, 204, respectively. return primary2;
|
protected javax.swing.plaf.ColorUIResource | getPrimary3()Returns the primary 3 color. This returns a color with rgb values
204, 204, 255, respectively. return primary3;
|
protected javax.swing.plaf.ColorUIResource | getSecondary1()Returns the secondary 1 color. This returns a color with rgb values
102, 102, and 102, respectively. return secondary1;
|
protected javax.swing.plaf.ColorUIResource | getSecondary2()Returns the secondary 2 color. This returns a color with rgb values
153, 153, and 153, respectively. return secondary2;
|
protected javax.swing.plaf.ColorUIResource | getSecondary3()Returns the secondary 3 color. This returns a color with rgb values
204, 204, and 204, respectively. return secondary3;
|
public javax.swing.plaf.FontUIResource | getSubTextFont()Returns the sub-text font. This returns Dialog, 10pt, plain.
return getFont(SUB_TEXT_FONT);
|
public javax.swing.plaf.FontUIResource | getSystemTextFont()Returns the system text font. This returns Dialog, 12pt, plain.
return getFont(SYSTEM_TEXT_FONT);
|
public javax.swing.plaf.FontUIResource | getUserTextFont()Returns the user text font. This returns Dialog, 12pt, plain.
return getFont(USER_TEXT_FONT);
|
public javax.swing.plaf.FontUIResource | getWindowTitleFont()Returns the window title font. This returns Dialog, 12pt, bold.
return getFont(WINDOW_TITLE_FONT);
|
void | install()
if (MetalLookAndFeel.isWindows() &&
MetalLookAndFeel.useSystemFonts()) {
fontDelegate = new WindowsFontDelegate();
}
else {
fontDelegate = new FontDelegate();
}
|
boolean | isSystemTheme()Returns true if this is a theme provided by the core platform.
return (getClass() == DefaultMetalTheme.class);
|