- Direct Known Subclasses:
- DefaultMetalTheme
MetalTheme provides the color palette and fonts used by
 the Java Look and Feel.
 
 MetalTheme is abstract, see DefaultMetalTheme and
 OceanTheme for concrete implementations.
 
 MetalLookAndFeel maintains the current theme that the
 the ComponentUI implementations for metal use. Refer to
 MetalLookAndFeel.setCurrentTheme(MetalTheme) for details on changing
 the current theme.
 
 MetalTheme provides 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, and getSecondary3); although a subclass
 may override the other public methods for more control over the set of
 colors that are used.
 
 Concrete implementations of MetalTheme must return non-null
 values from all methods. While the behavior of returning null is
 not specified, returning null will 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.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds values specific to this theme to the defaults table.Returns the accelerator foreground color.Returns the accelerator selected foreground color.protected ColorUIResourcegetBlack()Returns the black color.Returns the control color.Returns the control dark shadow color.Returns the control disabled color.Returns the control highlight color.Returns the control info color.Returns the control shadow color.Returns the control text color.abstract FontUIResourceReturns the control text font.Returns the desktop color.Returns the focus color.Returns the highlighted text color.Returns the inactive control text color.Returns the inactive system text color.Returns the menu background color.Returns the menu disabled foreground color.Returns the menu foreground color.Returns the menu selected background color.Returns the menu selected foreground color.abstract FontUIResourceReturns the menu text font.abstract StringgetName()Returns the name of this theme.protected abstract ColorUIResourceReturns the primary 1 color.protected abstract ColorUIResourceReturns the primary 2 color.protected abstract ColorUIResourceReturns the primary 3 color.Returns the primary control color.Returns the primary control dark shadow color.Returns the primary control highlight color.Returns the primary control info color.Returns the primary control shadow color.protected abstract ColorUIResourceReturns the secondary 1 color.protected abstract ColorUIResourceReturns the secondary 2 color.protected abstract ColorUIResourceReturns the secondary 3 color.Returns the separator background color.Returns the separator foreground color.abstract FontUIResourceReturns the sub-text font.Returns the system text color.abstract FontUIResourceReturns the system text font.Returns the text highlight color.Returns the user text color.abstract FontUIResourceReturns the user text font.protected ColorUIResourcegetWhite()Returns the white color.Returns the window background color.Returns the window title background color.abstract FontUIResourceReturns the window title font.Returns the window title foreground color.Returns the window title inactive background color.Returns the window title inactive foreground color.
- 
Constructor Details- 
MetalThemeprotected MetalTheme()Constructor for subclasses to call.
 
- 
- 
Method Details- 
getNameReturns the name of this theme.- Returns:
- the name of this theme
 
- 
getPrimary1Returns the primary 1 color.- Returns:
- the primary 1 color
 
- 
getPrimary2Returns the primary 2 color.- Returns:
- the primary 2 color
 
- 
getPrimary3Returns the primary 3 color.- Returns:
- the primary 3 color
 
- 
getSecondary1Returns the secondary 1 color.- Returns:
- the secondary 1 color
 
- 
getSecondary2Returns the secondary 2 color.- Returns:
- the secondary 2 color
 
- 
getSecondary3Returns the secondary 3 color.- Returns:
- the secondary 3 color
 
- 
getControlTextFontReturns the control text font.- Returns:
- the control text font
 
- 
getSystemTextFontReturns the system text font.- Returns:
- the system text font
 
- 
getUserTextFontReturns the user text font.- Returns:
- the user text font
 
- 
getMenuTextFontReturns the menu text font.- Returns:
- the menu text font
 
- 
getWindowTitleFontReturns the window title font.- Returns:
- the window title font
 
- 
getSubTextFontReturns the sub-text font.- Returns:
- the sub-text font
 
- 
getWhiteReturns the white color. This returns opaque white (0xFFFFFFFF).- Returns:
- the white color
 
- 
getBlackReturns the black color. This returns opaque black (0xFF000000).- Returns:
- the black color
 
- 
getFocusColorReturns the focus color. This returns the value ofgetPrimary2().- Returns:
- the focus color
 
- 
getDesktopColorReturns the desktop color. This returns the value ofgetPrimary2().- Returns:
- the desktop color
 
- 
getControlReturns the control color. This returns the value ofgetSecondary3().- Returns:
- the control color
 
- 
getControlShadowReturns the control shadow color. This returns the value ofgetSecondary2().- Returns:
- the control shadow color
 
- 
getControlDarkShadowReturns the control dark shadow color. This returns the value ofgetSecondary1().- Returns:
- the control dark shadow color
 
- 
getControlInfoReturns the control info color. This returns the value ofgetBlack().- Returns:
- the control info color
 
- 
getControlHighlightReturns the control highlight color. This returns the value ofgetWhite().- Returns:
- the control highlight color
 
- 
getControlDisabledReturns the control disabled color. This returns the value ofgetSecondary2().- Returns:
- the control disabled color
 
- 
getPrimaryControlReturns the primary control color. This returns the value ofgetPrimary3().- Returns:
- the primary control color
 
- 
getPrimaryControlShadowReturns the primary control shadow color. This returns the value ofgetPrimary2().- Returns:
- the primary control shadow color
 
- 
getPrimaryControlDarkShadowReturns the primary control dark shadow color. This returns the value ofgetPrimary1().- Returns:
- the primary control dark shadow color
 
- 
getPrimaryControlInfoReturns the primary control info color. This returns the value ofgetBlack().- Returns:
- the primary control info color
 
- 
getPrimaryControlHighlightReturns the primary control highlight color. This returns the value ofgetWhite().- Returns:
- the primary control highlight color
 
- 
getSystemTextColorReturns the system text color. This returns the value ofgetBlack().- Returns:
- the system text color
 
- 
getControlTextColorReturns the control text color. This returns the value ofgetControlInfo().- Returns:
- the control text color
 
- 
getInactiveControlTextColorReturns the inactive control text color. This returns the value ofgetControlDisabled().- Returns:
- the inactive control text color
 
- 
getInactiveSystemTextColorReturns the inactive system text color. This returns the value ofgetSecondary2().- Returns:
- the inactive system text color
 
- 
getUserTextColorReturns the user text color. This returns the value ofgetBlack().- Returns:
- the user text color
 
- 
getTextHighlightColorReturns the text highlight color. This returns the value ofgetPrimary3().- Returns:
- the text highlight color
 
- 
getHighlightedTextColorReturns the highlighted text color. This returns the value ofgetControlTextColor().- Returns:
- the highlighted text color
 
- 
getWindowBackgroundReturns the window background color. This returns the value ofgetWhite().- Returns:
- the window background color
 
- 
getWindowTitleBackgroundReturns the window title background color. This returns the value ofgetPrimary3().- Returns:
- the window title background color
 
- 
getWindowTitleForegroundReturns the window title foreground color. This returns the value ofgetBlack().- Returns:
- the window title foreground color
 
- 
getWindowTitleInactiveBackgroundReturns the window title inactive background color. This returns the value ofgetSecondary3().- Returns:
- the window title inactive background color
 
- 
getWindowTitleInactiveForegroundReturns the window title inactive foreground color. This returns the value ofgetBlack().- Returns:
- the window title inactive foreground color
 
- 
getMenuBackgroundReturns the menu background color. This returns the value ofgetSecondary3().- Returns:
- the menu background color
 
- 
getMenuForegroundReturns the menu foreground color. This returns the value ofgetBlack().- Returns:
- the menu foreground color
 
- 
getMenuSelectedBackgroundReturns the menu selected background color. This returns the value ofgetPrimary2().- Returns:
- the menu selected background color
 
- 
getMenuSelectedForegroundReturns the menu selected foreground color. This returns the value ofgetBlack().- Returns:
- the menu selected foreground color
 
- 
getMenuDisabledForegroundReturns the menu disabled foreground color. This returns the value ofgetSecondary2().- Returns:
- the menu disabled foreground color
 
- 
getSeparatorBackgroundReturns the separator background color. This returns the value ofgetWhite().- Returns:
- the separator background color
 
- 
getSeparatorForegroundReturns the separator foreground color. This returns the value ofgetPrimary1().- Returns:
- the separator foreground color
 
- 
getAcceleratorForegroundReturns the accelerator foreground color. This returns the value ofgetPrimary1().- Returns:
- the accelerator foreground color
 
- 
getAcceleratorSelectedForegroundReturns the accelerator selected foreground color. This returns the value ofgetBlack().- Returns:
- the accelerator selected foreground color
 
- 
addCustomEntriesToTableAdds 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:
 
 
-