- java.lang.Object
- 
- javax.swing.plaf.metal.MetalTheme
- 
- javax.swing.plaf.metal.DefaultMetalTheme
 
 
- 
- Direct Known Subclasses:
- OceanTheme
 
 public class DefaultMetalTheme extends MetalTheme A concrete implementation ofMetalThemeproviding the original look of the Java Look and Feel, code-named "Steel". Refer toMetalLookAndFeel.setCurrentTheme(javax.swing.plaf.metal.MetalTheme)for details on changing the default theme.All colors returned by DefaultMetalThemeare completely opaque.Font StyleDefaultMetalThemeuses bold fonts for many controls. To make all controls (with the exception of the internal frame title bars and client decorated frame title bars) use plain fonts you can do either of the following:- Set the system property swing.boldMetaltofalse. For example,java -Dswing.boldMetal=false MyApp.
- Set the defaults property swing.boldMetaltoBoolean.FALSE. For example:UIManager.put("swing.boldMetal", Boolean.FALSE);
 swing.boldMetal, if set, takes precedence over the system property of the same name. After setting this defaults property you need to re-installMetalLookAndFeel, as well as update the UI of any previously created widgets. Otherwise the results are undefined. The following illustrates how to do this:// turn off bold fonts UIManager.put("swing.boldMetal", Boolean.FALSE); // re-install the Metal Look and Feel UIManager.setLookAndFeel(new MetalLookAndFeel()); // Update the ComponentUIs for all Components. This // needs to be invoked for all windows. SwingUtilities.updateComponentTreeUI(rootComponent);Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beanspackage. Please seeXMLEncoder.
- 
- 
Constructor SummaryConstructors Constructor Description DefaultMetalTheme()Creates and returns an instance ofDefaultMetalTheme.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FontUIResourcegetControlTextFont()Returns the control text font.FontUIResourcegetMenuTextFont()Returns the menu text font.StringgetName()Returns the name of this theme.protected ColorUIResourcegetPrimary1()Returns the primary 1 color.protected ColorUIResourcegetPrimary2()Returns the primary 2 color.protected ColorUIResourcegetPrimary3()Returns the primary 3 color.protected ColorUIResourcegetSecondary1()Returns the secondary 1 color.protected ColorUIResourcegetSecondary2()Returns the secondary 2 color.protected ColorUIResourcegetSecondary3()Returns the secondary 3 color.FontUIResourcegetSubTextFont()Returns the sub-text font.FontUIResourcegetSystemTextFont()Returns the system text font.FontUIResourcegetUserTextFont()Returns the user text font.FontUIResourcegetWindowTitleFont()Returns the window title font.- 
Methods declared in class javax.swing.plaf.metal.MetalThemeaddCustomEntriesToTable, getAcceleratorForeground, getAcceleratorSelectedForeground, getBlack, getControl, getControlDarkShadow, getControlDisabled, getControlHighlight, getControlInfo, getControlShadow, getControlTextColor, getDesktopColor, getFocusColor, getHighlightedTextColor, getInactiveControlTextColor, getInactiveSystemTextColor, getMenuBackground, getMenuDisabledForeground, getMenuForeground, getMenuSelectedBackground, getMenuSelectedForeground, getPrimaryControl, getPrimaryControlDarkShadow, getPrimaryControlHighlight, getPrimaryControlInfo, getPrimaryControlShadow, getSeparatorBackground, getSeparatorForeground, getSystemTextColor, getTextHighlightColor, getUserTextColor, getWhite, getWindowBackground, getWindowTitleBackground, getWindowTitleForeground, getWindowTitleInactiveBackground, getWindowTitleInactiveForeground
 
- 
 
- 
- 
- 
Method Detail- 
getNamepublic String getName() Returns the name of this theme. This returns"Steel".- Specified by:
- getNamein class- MetalTheme
- Returns:
- the name of this theme.
 
 - 
getPrimary1protected ColorUIResource getPrimary1() Returns the primary 1 color. This returns a color with rgb values of 102, 102, and 153, respectively.- Specified by:
- getPrimary1in class- MetalTheme
- Returns:
- the primary 1 color
 
 - 
getPrimary2protected ColorUIResource getPrimary2() Returns the primary 2 color. This returns a color with rgb values of 153, 153, 204, respectively.- Specified by:
- getPrimary2in class- MetalTheme
- Returns:
- the primary 2 color
 
 - 
getPrimary3protected ColorUIResource getPrimary3() Returns the primary 3 color. This returns a color with rgb values 204, 204, 255, respectively.- Specified by:
- getPrimary3in class- MetalTheme
- Returns:
- the primary 3 color
 
 - 
getSecondary1protected ColorUIResource getSecondary1() Returns the secondary 1 color. This returns a color with rgb values 102, 102, and 102, respectively.- Specified by:
- getSecondary1in class- MetalTheme
- Returns:
- the secondary 1 color
 
 - 
getSecondary2protected ColorUIResource getSecondary2() Returns the secondary 2 color. This returns a color with rgb values 153, 153, and 153, respectively.- Specified by:
- getSecondary2in class- MetalTheme
- Returns:
- the secondary 2 color
 
 - 
getSecondary3protected ColorUIResource getSecondary3() Returns the secondary 3 color. This returns a color with rgb values 204, 204, and 204, respectively.- Specified by:
- getSecondary3in class- MetalTheme
- Returns:
- the secondary 3 color
 
 - 
getControlTextFontpublic 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.- Specified by:
- getControlTextFontin class- MetalTheme
- Returns:
- the control text font
 
 - 
getSystemTextFontpublic FontUIResource getSystemTextFont() Returns the system text font. This returns Dialog, 12pt, plain.- Specified by:
- getSystemTextFontin class- MetalTheme
- Returns:
- the system text font
 
 - 
getUserTextFontpublic FontUIResource getUserTextFont() Returns the user text font. This returns Dialog, 12pt, plain.- Specified by:
- getUserTextFontin class- MetalTheme
- Returns:
- the user text font
 
 - 
getMenuTextFontpublic 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.- Specified by:
- getMenuTextFontin class- MetalTheme
- Returns:
- the menu text font
 
 - 
getWindowTitleFontpublic FontUIResource getWindowTitleFont() Returns the window title font. This returns Dialog, 12pt, bold.- Specified by:
- getWindowTitleFontin class- MetalTheme
- Returns:
- the window title font
 
 - 
getSubTextFontpublic FontUIResource getSubTextFont() Returns the sub-text font. This returns Dialog, 10pt, plain.- Specified by:
- getSubTextFontin class- MetalTheme
- Returns:
- the sub-text font
 
 
- 
 
-