javax.swing.plaf.metal
Class MetalTheme

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

public abstract class MetalTheme
extends Object

This interface acts as a generic way to describe the colors used by Metal. Classes which implement this interface can be used to swap the colors in a Metal application.

Author:
Steve Wilson

Field Summary
private static ColorUIResource black
           
(package private) static int CONTROL_TEXT_FONT
           
(package private) static int MENU_TEXT_FONT
           
(package private) static int SUB_TEXT_FONT
           
(package private) static int SYSTEM_TEXT_FONT
           
(package private) static int USER_TEXT_FONT
           
private static ColorUIResource white
           
(package private) static int WINDOW_TITLE_FONT
           
 
Constructor Summary
MetalTheme()
           
 
Method Summary
 void addCustomEntriesToTable(UIDefaults table)
           
 ColorUIResource getAcceleratorForeground()
           
 ColorUIResource getAcceleratorSelectedForeground()
           
protected  ColorUIResource getBlack()
           
 ColorUIResource getControl()
           
 ColorUIResource getControlDarkShadow()
           
 ColorUIResource getControlDisabled()
           
 ColorUIResource getControlHighlight()
           
 ColorUIResource getControlInfo()
           
 ColorUIResource getControlShadow()
           
 ColorUIResource getControlTextColor()
           
abstract  FontUIResource getControlTextFont()
           
 ColorUIResource getDesktopColor()
           
 ColorUIResource getFocusColor()
           
 ColorUIResource getHighlightedTextColor()
           
 ColorUIResource getInactiveControlTextColor()
           
 ColorUIResource getInactiveSystemTextColor()
           
 ColorUIResource getMenuBackground()
           
 ColorUIResource getMenuDisabledForeground()
           
 ColorUIResource getMenuForeground()
           
 ColorUIResource getMenuSelectedBackground()
           
 ColorUIResource getMenuSelectedForeground()
           
abstract  FontUIResource getMenuTextFont()
           
abstract  String getName()
           
protected abstract  ColorUIResource getPrimary1()
           
protected abstract  ColorUIResource getPrimary2()
           
protected abstract  ColorUIResource getPrimary3()
           
 ColorUIResource getPrimaryControl()
           
 ColorUIResource getPrimaryControlDarkShadow()
           
 ColorUIResource getPrimaryControlHighlight()
           
 ColorUIResource getPrimaryControlInfo()
           
 ColorUIResource getPrimaryControlShadow()
           
protected abstract  ColorUIResource getSecondary1()
           
protected abstract  ColorUIResource getSecondary2()
           
protected abstract  ColorUIResource getSecondary3()
           
 ColorUIResource getSeparatorBackground()
           
 ColorUIResource getSeparatorForeground()
           
abstract  FontUIResource getSubTextFont()
           
 ColorUIResource getSystemTextColor()
          Returns the color used, by default, for the text in labels and titled borders.
abstract  FontUIResource getSystemTextFont()
           
 ColorUIResource getTextHighlightColor()
           
 ColorUIResource getUserTextColor()
           
abstract  FontUIResource getUserTextFont()
           
protected  ColorUIResource getWhite()
           
 ColorUIResource getWindowBackground()
           
 ColorUIResource getWindowTitleBackground()
           
abstract  FontUIResource getWindowTitleFont()
           
 ColorUIResource getWindowTitleForeground()
           
 ColorUIResource getWindowTitleInactiveBackground()
           
 ColorUIResource getWindowTitleInactiveForeground()
           
(package private)  void install()
          This is invoked when a MetalLookAndFeel is installed and about to start using this theme.
(package private)  boolean isSystemTheme()
          Returns true if this is a theme provided by the core platform.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTROL_TEXT_FONT

static final int CONTROL_TEXT_FONT
See Also:
Constant Field Values

SYSTEM_TEXT_FONT

static final int SYSTEM_TEXT_FONT
See Also:
Constant Field Values

USER_TEXT_FONT

static final int USER_TEXT_FONT
See Also:
Constant Field Values

MENU_TEXT_FONT

static final int MENU_TEXT_FONT
See Also:
Constant Field Values

WINDOW_TITLE_FONT

static final int WINDOW_TITLE_FONT
See Also:
Constant Field Values

SUB_TEXT_FONT

static final int SUB_TEXT_FONT
See Also:
Constant Field Values

white

private static ColorUIResource white

black

private static ColorUIResource black
Constructor Detail

MetalTheme

public MetalTheme()
Method Detail

getName

public abstract String getName()

getPrimary1

protected abstract ColorUIResource getPrimary1()

getPrimary2

protected abstract ColorUIResource getPrimary2()

getPrimary3

protected abstract ColorUIResource getPrimary3()

getSecondary1

protected abstract ColorUIResource getSecondary1()

getSecondary2

protected abstract ColorUIResource getSecondary2()

getSecondary3

protected abstract ColorUIResource getSecondary3()

getControlTextFont

public abstract FontUIResource getControlTextFont()

getSystemTextFont

public abstract FontUIResource getSystemTextFont()

getUserTextFont

public abstract FontUIResource getUserTextFont()

getMenuTextFont

public abstract FontUIResource getMenuTextFont()

getWindowTitleFont

public abstract FontUIResource getWindowTitleFont()

getSubTextFont

public abstract FontUIResource getSubTextFont()

getWhite

protected ColorUIResource getWhite()

getBlack

protected ColorUIResource getBlack()

getFocusColor

public ColorUIResource getFocusColor()

getDesktopColor

public ColorUIResource getDesktopColor()

getControl

public ColorUIResource getControl()

getControlShadow

public ColorUIResource getControlShadow()

getControlDarkShadow

public ColorUIResource getControlDarkShadow()

getControlInfo

public ColorUIResource getControlInfo()

getControlHighlight

public ColorUIResource getControlHighlight()

getControlDisabled

public ColorUIResource getControlDisabled()

getPrimaryControl

public ColorUIResource getPrimaryControl()

getPrimaryControlShadow

public ColorUIResource getPrimaryControlShadow()

getPrimaryControlDarkShadow

public ColorUIResource getPrimaryControlDarkShadow()

getPrimaryControlInfo

public ColorUIResource getPrimaryControlInfo()

getPrimaryControlHighlight

public ColorUIResource getPrimaryControlHighlight()

getSystemTextColor

public ColorUIResource getSystemTextColor()
Returns the color used, by default, for the text in labels and titled borders.


getControlTextColor

public ColorUIResource getControlTextColor()

getInactiveControlTextColor

public ColorUIResource getInactiveControlTextColor()

getInactiveSystemTextColor

public ColorUIResource getInactiveSystemTextColor()

getUserTextColor

public ColorUIResource getUserTextColor()

getTextHighlightColor

public ColorUIResource getTextHighlightColor()

getHighlightedTextColor

public ColorUIResource getHighlightedTextColor()

getWindowBackground

public ColorUIResource getWindowBackground()

getWindowTitleBackground

public ColorUIResource getWindowTitleBackground()

getWindowTitleForeground

public ColorUIResource getWindowTitleForeground()

getWindowTitleInactiveBackground

public ColorUIResource getWindowTitleInactiveBackground()

getWindowTitleInactiveForeground

public ColorUIResource getWindowTitleInactiveForeground()

getMenuBackground

public ColorUIResource getMenuBackground()

getMenuForeground

public ColorUIResource getMenuForeground()

getMenuSelectedBackground

public ColorUIResource getMenuSelectedBackground()

getMenuSelectedForeground

public ColorUIResource getMenuSelectedForeground()

getMenuDisabledForeground

public ColorUIResource getMenuDisabledForeground()

getSeparatorBackground

public ColorUIResource getSeparatorBackground()

getSeparatorForeground

public ColorUIResource getSeparatorForeground()

getAcceleratorForeground

public ColorUIResource getAcceleratorForeground()

getAcceleratorSelectedForeground

public ColorUIResource getAcceleratorSelectedForeground()

addCustomEntriesToTable

public void addCustomEntriesToTable(UIDefaults table)

install

void install()
This is invoked when a MetalLookAndFeel is installed and about to start using this theme. When we can add API this should be nuked in favor of DefaultMetalTheme overriding addCustomEntriesToTable.


isSystemTheme

boolean isSystemTheme()
Returns true if this is a theme provided by the core platform.