javax.swing.plaf.metal
Class MetalTheme

java.lang.Object
  extended by javax.swing.plaf.metal.MetalTheme
Direct Known Subclasses:
DefaultMetalTheme

public abstract class MetalTheme
extends Object

The base class for themes used by the MetalLookAndFeel. A default theme (DefaultMetalTheme) is provided, or you can create and use your own.

See Also:
MetalLookAndFeel.setCurrentTheme(MetalTheme)

Constructor Summary
MetalTheme()
          Default constructor.
 
Method Summary
 void addCustomEntriesToTable(UIDefaults table)
          Adds custom entries to the UI defaults table.
 ColorUIResource getAcceleratorForeground()
          Returns the accelerator foreground color.
 ColorUIResource getAcceleratorSelectedForeground()
          Returns the accelerator selected foreground color.
protected  ColorUIResource getBlack()
          Returns the color used for black.
 ColorUIResource getControl()
          Returns the control color.
 ColorUIResource getControlDarkShadow()
          Returns the color used for dark shadows on controls.
 ColorUIResource getControlDisabled()
          Returns the color used for disabled controls.
 ColorUIResource getControlHighlight()
          Returns the color used to draw highlights for controls.
 ColorUIResource getControlInfo()
          Returns the color used to display control info.
 ColorUIResource getControlShadow()
          Returns the color used to draw shadows for controls.
 ColorUIResource getControlTextColor()
          Returns the color used for text on controls.
abstract  FontUIResource getControlTextFont()
          Returns the font used for text on controls.
 ColorUIResource getDesktopColor()
          Returns the color used for the desktop background.
 ColorUIResource getFocusColor()
          Returns the color used to draw focus highlights.
 ColorUIResource getHighlightedTextColor()
          Returns the color used to draw highlighted text.
 ColorUIResource getInactiveControlTextColor()
          Returns the color used to draw text on inactive controls.
 ColorUIResource getInactiveSystemTextColor()
          Returns the color used to draw inactive system text.
 ColorUIResource getMenuBackground()
          Returns the background color for menu items.
 ColorUIResource getMenuDisabledForeground()
          Returns the foreground color for disabled menu items.
 ColorUIResource getMenuForeground()
          Returns the foreground color for menu items.
 ColorUIResource getMenuSelectedBackground()
          Returns the background color for selected menu items.
 ColorUIResource getMenuSelectedForeground()
          Returns the foreground color for selected menu items.
abstract  FontUIResource getMenuTextFont()
          Returns the font used for text in menus.
abstract  String getName()
          Returns the name of the theme.
protected abstract  ColorUIResource getPrimary1()
          Returns the first primary color for this theme.
protected abstract  ColorUIResource getPrimary2()
          Returns the second primary color for this theme.
protected abstract  ColorUIResource getPrimary3()
          Returns the third primary color for this theme.
 ColorUIResource getPrimaryControl()
          Returns the primary color for controls.
 ColorUIResource getPrimaryControlDarkShadow()
          Returns the primary color for the dark shadow on controls.
 ColorUIResource getPrimaryControlHighlight()
          Returns the primary color for the highlight on controls.
 ColorUIResource getPrimaryControlInfo()
          Returns the primary color for the information on controls.
 ColorUIResource getPrimaryControlShadow()
          Returns the primary color for the shadow on controls.
protected abstract  ColorUIResource getSecondary1()
          Returns the first secondary color for this theme.
protected abstract  ColorUIResource getSecondary2()
          Returns the second secondary color for this theme.
protected abstract  ColorUIResource getSecondary3()
          Returns the third secondary color for this theme.
 ColorUIResource getSeparatorBackground()
          Returns the background color for separators.
 ColorUIResource getSeparatorForeground()
          Returns the foreground color for separators.
abstract  FontUIResource getSubTextFont()
          Returns the font used for sub text.
 ColorUIResource getSystemTextColor()
          Returns the color used for system text.
abstract  FontUIResource getSystemTextFont()
          Returns the font used for system text.
 ColorUIResource getTextHighlightColor()
          Returns the color used to highlight text.
 ColorUIResource getUserTextColor()
          Returns the color used to display user text.
abstract  FontUIResource getUserTextFont()
          Returns the font used for user text.
protected  ColorUIResource getWhite()
          Returns the color used for white.
 ColorUIResource getWindowBackground()
          Returns the window background color.
 ColorUIResource getWindowTitleBackground()
          Returns the window title background color.
abstract  FontUIResource getWindowTitleFont()
          Returns the font used for window titles.
 ColorUIResource getWindowTitleForeground()
          Returns the window title foreground color.
 ColorUIResource getWindowTitleInactiveBackground()
          Returns the background color for an inactive window title.
 ColorUIResource getWindowTitleInactiveForeground()
          Returns the foreground color for an inactive window title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetalTheme

public MetalTheme()
Default constructor.

Method Detail

getName

public abstract String getName()
Returns the name of the theme.

Returns:
The name of the theme.

addCustomEntriesToTable

public void addCustomEntriesToTable(UIDefaults table)
Adds custom entries to the UI defaults table. This method is empty.

Parameters:
table - the table.

getAcceleratorForeground

public ColorUIResource getAcceleratorForeground()
Returns the accelerator foreground color. The default implementation returns the color from getPrimary1().

Returns:
The accelerator foreground color.

getAcceleratorSelectedForeground

public ColorUIResource getAcceleratorSelectedForeground()
Returns the accelerator selected foreground color. The default implementation returns the color from getBlack().

Returns:
The accelerator selected foreground color.

getControl

public ColorUIResource getControl()
Returns the control color. The default implementation returns the color from getSecondary3().

Returns:
The control color.

getControlDarkShadow

public ColorUIResource getControlDarkShadow()
Returns the color used for dark shadows on controls. The default implementation returns the color from getSecondary1().

Returns:
The color used for dark shadows on controls.

getControlDisabled

public ColorUIResource getControlDisabled()
Returns the color used for disabled controls. The default implementation returns the color from getSecondary1().

Returns:
The color used for disabled controls.

getControlHighlight

public ColorUIResource getControlHighlight()
Returns the color used to draw highlights for controls. The default implementation returns the color from getWhite().

Returns:
The color used to draw highlights for controls.

getControlInfo

public ColorUIResource getControlInfo()
Returns the color used to display control info. The default implementation returns the color from getBlack().

Returns:
The color used to display control info.

getControlShadow

public ColorUIResource getControlShadow()
Returns the color used to draw shadows for controls. The default implementation returns the color from getSecondary2().

Returns:
The color used to draw shadows for controls.

getControlTextColor

public ColorUIResource getControlTextColor()
Returns the color used for text on controls. The default implementation returns the color from getControlInfo().

Returns:
The color used for text on controls.

getDesktopColor

public ColorUIResource getDesktopColor()
Returns the color used for the desktop background. The default implementation returns the color from getPrimary2().

Returns:
The color used for the desktop background.

getFocusColor

public ColorUIResource getFocusColor()
Returns the color used to draw focus highlights. The default implementation returns the color from getPrimary2().

Returns:
The color used to draw focus highlights.

getHighlightedTextColor

public ColorUIResource getHighlightedTextColor()
Returns the color used to draw highlighted text. The default implementation returns the color from getHighlightedTextColor().

Returns:
The color used to draw highlighted text.

getInactiveControlTextColor

public ColorUIResource getInactiveControlTextColor()
Returns the color used to draw text on inactive controls. The default implementation returns the color from getControlDisabled().

Returns:
The color used to draw text on inactive controls.

getInactiveSystemTextColor

public ColorUIResource getInactiveSystemTextColor()
Returns the color used to draw inactive system text. The default implementation returns the color from getSecondary2().

Returns:
The color used to draw inactive system text.

getMenuBackground

public ColorUIResource getMenuBackground()
Returns the background color for menu items. The default implementation returns the color from getSecondary3().

Returns:
The background color for menu items.
See Also:
getMenuSelectedBackground()

getMenuDisabledForeground

public ColorUIResource getMenuDisabledForeground()
Returns the foreground color for disabled menu items. The default implementation returns the color from getSecondary2().

Returns:
The foreground color for disabled menu items.
See Also:
getMenuForeground()

getMenuForeground

public ColorUIResource getMenuForeground()
Returns the foreground color for menu items. The default implementation returns the color from getBlack().

Returns:
The foreground color for menu items.
See Also:
getMenuDisabledForeground(), getMenuSelectedForeground()

getMenuSelectedBackground

public ColorUIResource getMenuSelectedBackground()
Returns the background color for selected menu items. The default implementation returns the color from getPrimary2().

Returns:
The background color for selected menu items.
See Also:
getMenuBackground()

getMenuSelectedForeground

public ColorUIResource getMenuSelectedForeground()
Returns the foreground color for selected menu items. The default implementation returns the value from getBlack().

Returns:
The foreground color for selected menu items.
See Also:
getMenuForeground()

getPrimaryControl

public ColorUIResource getPrimaryControl()
Returns the primary color for controls. The default implementation returns the color from getPrimary3().

Returns:
The primary color for controls.

getPrimaryControlDarkShadow

public ColorUIResource getPrimaryControlDarkShadow()
Returns the primary color for the dark shadow on controls. The default implementation returns the color from getPrimary1().

Returns:
The primary color for the dark shadow on controls.

getPrimaryControlHighlight

public ColorUIResource getPrimaryControlHighlight()
Returns the primary color for the highlight on controls. The default implementation returns the color from getWhite().

Returns:
The primary color for the highlight on controls.

getPrimaryControlInfo

public ColorUIResource getPrimaryControlInfo()
Returns the primary color for the information on controls. The default implementation returns the color from getBlack().

Returns:
The primary color for the information on controls.

getPrimaryControlShadow

public ColorUIResource getPrimaryControlShadow()
Returns the primary color for the shadow on controls. The default implementation returns the color from getPrimary2().

Returns:
The primary color for the shadow on controls.

getSeparatorBackground

public ColorUIResource getSeparatorBackground()
Returns the background color for separators. The default implementation returns the color from getWhite().

Returns:
The background color for separators.

getSeparatorForeground

public ColorUIResource getSeparatorForeground()
Returns the foreground color for separators. The default implementation returns the value from getPrimary1().

Returns:
The foreground color for separators.

getSystemTextColor

public ColorUIResource getSystemTextColor()
Returns the color used for system text. The default implementation returns the color from getBlack().

Returns:
The color used for system text.

getTextHighlightColor

public ColorUIResource getTextHighlightColor()
Returns the color used to highlight text. The default implementation returns the color from getPrimary3().

Returns:
The color used to highlight text.

getUserTextColor

public ColorUIResource getUserTextColor()
Returns the color used to display user text. The default implementation returns the color from getBlack().

Returns:
The color used to display user text.

getWindowBackground

public ColorUIResource getWindowBackground()
Returns the window background color. The default implementation returns the color from getWhite().

Returns:
The window background color.

getWindowTitleBackground

public ColorUIResource getWindowTitleBackground()
Returns the window title background color. The default implementation returns the color from getPrimary3().

Returns:
The window title background color.

getWindowTitleForeground

public ColorUIResource getWindowTitleForeground()
Returns the window title foreground color. The default implementation returns the color from getBlack().

Returns:
The window title foreground color.

getWindowTitleInactiveBackground

public ColorUIResource getWindowTitleInactiveBackground()
Returns the background color for an inactive window title. The default implementation returns the color from getSecondary3().

Returns:
The background color for an inactive window title.

getWindowTitleInactiveForeground

public ColorUIResource getWindowTitleInactiveForeground()
Returns the foreground color for an inactive window title. The default implementation returns the color from getBlack().

Returns:
The foreground color for an inactive window title.

getBlack

protected ColorUIResource getBlack()
Returns the color used for black.

Returns:
The color used for black.

getWhite

protected ColorUIResource getWhite()
Returns the color used for white.

Returns:
The color used for white.

getPrimary1

protected abstract ColorUIResource getPrimary1()
Returns the first primary color for this theme.

Returns:
The first primary color.

getPrimary2

protected abstract ColorUIResource getPrimary2()
Returns the second primary color for this theme.

Returns:
The second primary color.

getPrimary3

protected abstract ColorUIResource getPrimary3()
Returns the third primary color for this theme.

Returns:
The third primary color.

getSecondary1

protected abstract ColorUIResource getSecondary1()
Returns the first secondary color for this theme.

Returns:
The first secondary color.

getSecondary2

protected abstract ColorUIResource getSecondary2()
Returns the second secondary color for this theme.

Returns:
The second secondary color.

getSecondary3

protected abstract ColorUIResource getSecondary3()
Returns the third secondary color for this theme.

Returns:
The third secondary color.

getControlTextFont

public abstract FontUIResource getControlTextFont()
Returns the font used for text on controls.

Returns:
The font used for text on controls.

getMenuTextFont

public abstract FontUIResource getMenuTextFont()
Returns the font used for text in menus.

Returns:
The font used for text in menus.

getSubTextFont

public abstract FontUIResource getSubTextFont()
Returns the font used for sub text.

Returns:
The font used for sub text.

getSystemTextFont

public abstract FontUIResource getSystemTextFont()
Returns the font used for system text.

Returns:
The font used for system text.

getUserTextFont

public abstract FontUIResource getUserTextFont()
Returns the font used for user text.

Returns:
The font used for user text.

getWindowTitleFont

public abstract FontUIResource getWindowTitleFont()
Returns the font used for window titles.

Returns:
The font used for window titles.