- java.lang.Object
- 
- javax.swing.plaf.metal.MetalTheme
 
- 
- Direct Known Subclasses:
- DefaultMetalTheme
 
 public abstract class MetalTheme extends Object MetalThemeprovides the color palette and fonts used by the Java Look and Feel.MetalThemeis abstract, seeDefaultMetalThemeandOceanThemefor concrete implementations.MetalLookAndFeelmaintains the current theme that the theComponentUIimplementations for metal use. Refer toMetalLookAndFeel.setCurrentTheme(MetalTheme)for details on changing the current theme.MetalThemeprovides a number of public methods for getting colors. These methods are implemented in terms of a handful of protected abstract methods. A subclass need only override the protected abstract methods (getPrimary1,getPrimary2,getPrimary3,getSecondary1,getSecondary2, andgetSecondary3); although a subclass may override the other public methods for more control over the set of colors that are used.Concrete implementations of MetalThememust returnnon-nullvalues from all methods. While the behavior of returningnullis not specified, returningnullwill result in incorrect behavior.It is strongly recommended that subclasses return completely opaque colors. To do otherwise may result in rendering problems, such as visual garbage. 
- 
- 
Constructor SummaryConstructors Constructor Description MetalTheme()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddCustomEntriesToTable(UIDefaults table)Adds values specific to this theme to the defaults table.ColorUIResourcegetAcceleratorForeground()Returns the accelerator foreground color.ColorUIResourcegetAcceleratorSelectedForeground()Returns the accelerator selected foreground color.protected ColorUIResourcegetBlack()Returns the black color.ColorUIResourcegetControl()Returns the control color.ColorUIResourcegetControlDarkShadow()Returns the control dark shadow color.ColorUIResourcegetControlDisabled()Returns the control disabled color.ColorUIResourcegetControlHighlight()Returns the control highlight color.ColorUIResourcegetControlInfo()Returns the control info color.ColorUIResourcegetControlShadow()Returns the control shadow color.ColorUIResourcegetControlTextColor()Returns the control text color.abstract FontUIResourcegetControlTextFont()Returns the control text font.ColorUIResourcegetDesktopColor()Returns the desktop color.ColorUIResourcegetFocusColor()Returns the focus color.ColorUIResourcegetHighlightedTextColor()Returns the highlighted text color.ColorUIResourcegetInactiveControlTextColor()Returns the inactive control text color.ColorUIResourcegetInactiveSystemTextColor()Returns the inactive system text color.ColorUIResourcegetMenuBackground()Returns the menu background color.ColorUIResourcegetMenuDisabledForeground()Returns the menu disabled foreground color.ColorUIResourcegetMenuForeground()Returns the menu foreground color.ColorUIResourcegetMenuSelectedBackground()Returns the menu selected background color.ColorUIResourcegetMenuSelectedForeground()Returns the menu selected foreground color.abstract FontUIResourcegetMenuTextFont()Returns the menu text font.abstract StringgetName()Returns the name of this theme.protected abstract ColorUIResourcegetPrimary1()Returns the primary 1 color.protected abstract ColorUIResourcegetPrimary2()Returns the primary 2 color.protected abstract ColorUIResourcegetPrimary3()Returns the primary 3 color.ColorUIResourcegetPrimaryControl()Returns the primary control color.ColorUIResourcegetPrimaryControlDarkShadow()Returns the primary control dark shadow color.ColorUIResourcegetPrimaryControlHighlight()Returns the primary control highlight color.ColorUIResourcegetPrimaryControlInfo()Returns the primary control info color.ColorUIResourcegetPrimaryControlShadow()Returns the primary control shadow color.protected abstract ColorUIResourcegetSecondary1()Returns the secondary 1 color.protected abstract ColorUIResourcegetSecondary2()Returns the secondary 2 color.protected abstract ColorUIResourcegetSecondary3()Returns the secondary 3 color.ColorUIResourcegetSeparatorBackground()Returns the separator background color.ColorUIResourcegetSeparatorForeground()Returns the separator foreground color.abstract FontUIResourcegetSubTextFont()Returns the sub-text font.ColorUIResourcegetSystemTextColor()Returns the system text color.abstract FontUIResourcegetSystemTextFont()Returns the system text font.ColorUIResourcegetTextHighlightColor()Returns the text highlight color.ColorUIResourcegetUserTextColor()Returns the user text color.abstract FontUIResourcegetUserTextFont()Returns the user text font.protected ColorUIResourcegetWhite()Returns the white color.ColorUIResourcegetWindowBackground()Returns the window background color.ColorUIResourcegetWindowTitleBackground()Returns the window title background color.abstract FontUIResourcegetWindowTitleFont()Returns the window title font.ColorUIResourcegetWindowTitleForeground()Returns the window title foreground color.ColorUIResourcegetWindowTitleInactiveBackground()Returns the window title inactive background color.ColorUIResourcegetWindowTitleInactiveForeground()Returns the window title inactive foreground color.
 
- 
- 
- 
Method Detail- 
getNamepublic abstract String getName() Returns the name of this theme.- Returns:
- the name of this theme
 
 - 
getPrimary1protected abstract ColorUIResource getPrimary1() Returns the primary 1 color.- Returns:
- the primary 1 color
 
 - 
getPrimary2protected abstract ColorUIResource getPrimary2() Returns the primary 2 color.- Returns:
- the primary 2 color
 
 - 
getPrimary3protected abstract ColorUIResource getPrimary3() Returns the primary 3 color.- Returns:
- the primary 3 color
 
 - 
getSecondary1protected abstract ColorUIResource getSecondary1() Returns the secondary 1 color.- Returns:
- the secondary 1 color
 
 - 
getSecondary2protected abstract ColorUIResource getSecondary2() Returns the secondary 2 color.- Returns:
- the secondary 2 color
 
 - 
getSecondary3protected abstract ColorUIResource getSecondary3() Returns the secondary 3 color.- Returns:
- the secondary 3 color
 
 - 
getControlTextFontpublic abstract FontUIResource getControlTextFont() Returns the control text font.- Returns:
- the control text font
 
 - 
getSystemTextFontpublic abstract FontUIResource getSystemTextFont() Returns the system text font.- Returns:
- the system text font
 
 - 
getUserTextFontpublic abstract FontUIResource getUserTextFont() Returns the user text font.- Returns:
- the user text font
 
 - 
getMenuTextFontpublic abstract FontUIResource getMenuTextFont() Returns the menu text font.- Returns:
- the menu text font
 
 - 
getWindowTitleFontpublic abstract FontUIResource getWindowTitleFont() Returns the window title font.- Returns:
- the window title font
 
 - 
getSubTextFontpublic abstract FontUIResource getSubTextFont() Returns the sub-text font.- Returns:
- the sub-text font
 
 - 
getWhiteprotected ColorUIResource getWhite() Returns the white color. This returns opaque white (0xFFFFFFFF).- Returns:
- the white color
 
 - 
getBlackprotected ColorUIResource getBlack() Returns the black color. This returns opaque black (0xFF000000).- Returns:
- the black color
 
 - 
getFocusColorpublic ColorUIResource getFocusColor() Returns the focus color. This returns the value ofgetPrimary2().- Returns:
- the focus color
 
 - 
getDesktopColorpublic ColorUIResource getDesktopColor() Returns the desktop color. This returns the value ofgetPrimary2().- Returns:
- the desktop color
 
 - 
getControlpublic ColorUIResource getControl() Returns the control color. This returns the value ofgetSecondary3().- Returns:
- the control color
 
 - 
getControlShadowpublic ColorUIResource getControlShadow() Returns the control shadow color. This returns the value ofgetSecondary2().- Returns:
- the control shadow color
 
 - 
getControlDarkShadowpublic ColorUIResource getControlDarkShadow() Returns the control dark shadow color. This returns the value ofgetSecondary1().- Returns:
- the control dark shadow color
 
 - 
getControlInfopublic ColorUIResource getControlInfo() Returns the control info color. This returns the value ofgetBlack().- Returns:
- the control info color
 
 - 
getControlHighlightpublic ColorUIResource getControlHighlight() Returns the control highlight color. This returns the value ofgetWhite().- Returns:
- the control highlight color
 
 - 
getControlDisabledpublic ColorUIResource getControlDisabled() Returns the control disabled color. This returns the value ofgetSecondary2().- Returns:
- the control disabled color
 
 - 
getPrimaryControlpublic ColorUIResource getPrimaryControl() Returns the primary control color. This returns the value ofgetPrimary3().- Returns:
- the primary control color
 
 - 
getPrimaryControlShadowpublic ColorUIResource getPrimaryControlShadow() Returns the primary control shadow color. This returns the value ofgetPrimary2().- Returns:
- the primary control shadow color
 
 - 
getPrimaryControlDarkShadowpublic ColorUIResource getPrimaryControlDarkShadow() Returns the primary control dark shadow color. This returns the value ofgetPrimary1().- Returns:
- the primary control dark shadow color
 
 - 
getPrimaryControlInfopublic ColorUIResource getPrimaryControlInfo() Returns the primary control info color. This returns the value ofgetBlack().- Returns:
- the primary control info color
 
 - 
getPrimaryControlHighlightpublic ColorUIResource getPrimaryControlHighlight() Returns the primary control highlight color. This returns the value ofgetWhite().- Returns:
- the primary control highlight color
 
 - 
getSystemTextColorpublic ColorUIResource getSystemTextColor() Returns the system text color. This returns the value ofgetBlack().- Returns:
- the system text color
 
 - 
getControlTextColorpublic ColorUIResource getControlTextColor() Returns the control text color. This returns the value ofgetControlInfo().- Returns:
- the control text color
 
 - 
getInactiveControlTextColorpublic ColorUIResource getInactiveControlTextColor() Returns the inactive control text color. This returns the value ofgetControlDisabled().- Returns:
- the inactive control text color
 
 - 
getInactiveSystemTextColorpublic ColorUIResource getInactiveSystemTextColor() Returns the inactive system text color. This returns the value ofgetSecondary2().- Returns:
- the inactive system text color
 
 - 
getUserTextColorpublic ColorUIResource getUserTextColor() Returns the user text color. This returns the value ofgetBlack().- Returns:
- the user text color
 
 - 
getTextHighlightColorpublic ColorUIResource getTextHighlightColor() Returns the text highlight color. This returns the value ofgetPrimary3().- Returns:
- the text highlight color
 
 - 
getHighlightedTextColorpublic ColorUIResource getHighlightedTextColor() Returns the highlighted text color. This returns the value ofgetControlTextColor().- Returns:
- the highlighted text color
 
 - 
getWindowBackgroundpublic ColorUIResource getWindowBackground() Returns the window background color. This returns the value ofgetWhite().- Returns:
- the window background color
 
 - 
getWindowTitleBackgroundpublic ColorUIResource getWindowTitleBackground() Returns the window title background color. This returns the value ofgetPrimary3().- Returns:
- the window title background color
 
 - 
getWindowTitleForegroundpublic ColorUIResource getWindowTitleForeground() Returns the window title foreground color. This returns the value ofgetBlack().- Returns:
- the window title foreground color
 
 - 
getWindowTitleInactiveBackgroundpublic ColorUIResource getWindowTitleInactiveBackground() Returns the window title inactive background color. This returns the value ofgetSecondary3().- Returns:
- the window title inactive background color
 
 - 
getWindowTitleInactiveForegroundpublic ColorUIResource getWindowTitleInactiveForeground() Returns the window title inactive foreground color. This returns the value ofgetBlack().- Returns:
- the window title inactive foreground color
 
 - 
getMenuBackgroundpublic ColorUIResource getMenuBackground() Returns the menu background color. This returns the value ofgetSecondary3().- Returns:
- the menu background color
 
 - 
getMenuForegroundpublic ColorUIResource getMenuForeground() Returns the menu foreground color. This returns the value ofgetBlack().- Returns:
- the menu foreground color
 
 - 
getMenuSelectedBackgroundpublic ColorUIResource getMenuSelectedBackground() Returns the menu selected background color. This returns the value ofgetPrimary2().- Returns:
- the menu selected background color
 
 - 
getMenuSelectedForegroundpublic ColorUIResource getMenuSelectedForeground() Returns the menu selected foreground color. This returns the value ofgetBlack().- Returns:
- the menu selected foreground color
 
 - 
getMenuDisabledForegroundpublic ColorUIResource getMenuDisabledForeground() Returns the menu disabled foreground color. This returns the value ofgetSecondary2().- Returns:
- the menu disabled foreground color
 
 - 
getSeparatorBackgroundpublic ColorUIResource getSeparatorBackground() Returns the separator background color. This returns the value ofgetWhite().- Returns:
- the separator background color
 
 - 
getSeparatorForegroundpublic ColorUIResource getSeparatorForeground() Returns the separator foreground color. This returns the value ofgetPrimary1().- Returns:
- the separator foreground color
 
 - 
getAcceleratorForegroundpublic ColorUIResource getAcceleratorForeground() Returns the accelerator foreground color. This returns the value ofgetPrimary1().- Returns:
- the accelerator foreground color
 
 - 
getAcceleratorSelectedForegroundpublic ColorUIResource getAcceleratorSelectedForeground() Returns the accelerator selected foreground color. This returns the value ofgetBlack().- Returns:
- the accelerator selected foreground color
 
 - 
addCustomEntriesToTablepublic void addCustomEntriesToTable(UIDefaults table) Adds values specific to this theme to the defaults table. This method is invoked when the look and feel defaults are obtained fromMetalLookAndFeel.This implementation does nothing; it is provided for subclasses that wish to customize the defaults table. - Parameters:
- table- the- UIDefaultsto add the values to
- See Also:
- MetalLookAndFeel.getDefaults()
 
 
- 
 
-