| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public abstract class MetalTheme extends Object
{@code MetalTheme} provides the color palette and fonts used by the Java Look and Feel.
{@code MetalTheme} is abstract, see {@code DefaultMetalTheme} and {@code OceanTheme} for concrete implementations.
{@code MetalLookAndFeel} maintains the current theme that the the {@code ComponentUI} implementations for metal use. Refer to {@link MetalLookAndFeel#setCurrentTheme MetalLookAndFeel.setCurrentTheme(MetalTheme)} for details on changing the current theme.
{@code 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 ({@code getPrimary1}, {@code getPrimary2}, {@code getPrimary3}, {@code getSecondary1}, {@code getSecondary2}, and {@code getSecondary3}); although a subclass may override the other public methods for more control over the set of colors that are used.
Concrete implementations of {@code MetalTheme} must return {@code non-null} values from all methods. While the behavior of returning {@code null} is not specified, returning {@code 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.
Constructor Summary | |
---|---|
|
Method Summary | |
---|---|
void |
Adds values specific to this theme to the defaults table. |
ColorUIResource |
Returns the accelerator foreground color. |
ColorUIResource |
Returns the accelerator selected foreground color. |
protected ColorUIResource |
getBlack() Returns the black color. |
ColorUIResource |
Returns the control color. |
ColorUIResource |
Returns the control dark shadow color. |
ColorUIResource |
Returns the control disabled color. |
ColorUIResource |
Returns the control highlight color. |
ColorUIResource |
Returns the control info color. |
ColorUIResource |
Returns the control shadow color. |
ColorUIResource |
Returns the control text color. |
abstract FontUIResource |
Returns the control text font. |
ColorUIResource |
Returns the desktop color. |
ColorUIResource |
Returns the focus color. |
ColorUIResource |
Returns the highlighted text color. |
ColorUIResource |
Returns the inactive control text color. |
ColorUIResource |
Returns the inactive system text color. |
ColorUIResource |
Returns the menu background color. |
ColorUIResource |
Returns the menu disabled foreground color. |
ColorUIResource |
Returns the menu foreground color. |
ColorUIResource |
Returns the menu selected background color. |
ColorUIResource |
Returns the menu selected foreground color. |
abstract FontUIResource |
Returns the menu text font. |
abstract String |
getName() Returns the name of this theme. |
protected abstract ColorUIResource |
Returns the primary 1 color. |
protected abstract ColorUIResource |
Returns the primary 2 color. |
protected abstract ColorUIResource |
Returns the primary 3 color. |
ColorUIResource |
Returns the primary control color. |
ColorUIResource |
Returns the primary control dark shadow color. |
ColorUIResource |
Returns the primary control highlight color. |
ColorUIResource |
Returns the primary control info color. |
ColorUIResource |
Returns the primary control shadow color. |
protected abstract ColorUIResource |
Returns the secondary 1 color. |
protected abstract ColorUIResource |
Returns the secondary 2 color. |
protected abstract ColorUIResource |
Returns the secondary 3 color. |
ColorUIResource |
Returns the separator background color. |
ColorUIResource |
Returns the separator foreground color. |
abstract FontUIResource |
Returns the sub-text font. |
ColorUIResource |
Returns the system text color. |
abstract FontUIResource |
Returns the system text font. |
ColorUIResource |
Returns the text highlight color. |
ColorUIResource |
Returns the user text color. |
abstract FontUIResource |
Returns the user text font. |
protected ColorUIResource |
getWhite() Returns the white color. |
ColorUIResource |
Returns the window background color. |
ColorUIResource |
Returns the window title background color. |
abstract FontUIResource |
Returns the window title font. |
ColorUIResource |
Returns the window title foreground color. |
ColorUIResource |
Returns the window title inactive background color. |
ColorUIResource |
Returns the window title inactive foreground color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetalTheme()
Method Detail |
---|
public void addCustomEntriesToTable(UIDefaults table)
This implementation does nothing; it is provided for subclasses that wish to customize the defaults table.
table
- the {@code UIDefaults} to add the values topublic ColorUIResource getAcceleratorForeground()
public ColorUIResource getAcceleratorSelectedForeground()
protected ColorUIResource getBlack()
public ColorUIResource getControl()
public ColorUIResource getControlDarkShadow()
public ColorUIResource getControlDisabled()
public ColorUIResource getControlHighlight()
public ColorUIResource getControlInfo()
public ColorUIResource getControlShadow()
public ColorUIResource getControlTextColor()
public abstract FontUIResource getControlTextFont()
public ColorUIResource getDesktopColor()
public ColorUIResource getFocusColor()
public ColorUIResource getHighlightedTextColor()
public ColorUIResource getInactiveControlTextColor()
public ColorUIResource getInactiveSystemTextColor()
public ColorUIResource getMenuBackground()
public ColorUIResource getMenuDisabledForeground()
public ColorUIResource getMenuForeground()
public ColorUIResource getMenuSelectedBackground()
public ColorUIResource getMenuSelectedForeground()
public abstract FontUIResource getMenuTextFont()
public abstract String getName()
protected abstract ColorUIResource getPrimary1()
protected abstract ColorUIResource getPrimary2()
protected abstract ColorUIResource getPrimary3()
public ColorUIResource getPrimaryControl()
public ColorUIResource getPrimaryControlDarkShadow()
public ColorUIResource getPrimaryControlHighlight()
public ColorUIResource getPrimaryControlInfo()
public ColorUIResource getPrimaryControlShadow()
protected abstract ColorUIResource getSecondary1()
protected abstract ColorUIResource getSecondary2()
protected abstract ColorUIResource getSecondary3()
public ColorUIResource getSeparatorBackground()
public ColorUIResource getSeparatorForeground()
public abstract FontUIResource getSubTextFont()
public ColorUIResource getSystemTextColor()
public abstract FontUIResource getSystemTextFont()
public ColorUIResource getTextHighlightColor()
public ColorUIResource getUserTextColor()
public abstract FontUIResource getUserTextFont()
protected ColorUIResource getWhite()
public ColorUIResource getWindowBackground()
public ColorUIResource getWindowTitleBackground()
public abstract FontUIResource getWindowTitleFont()
public ColorUIResource getWindowTitleForeground()
public ColorUIResource getWindowTitleInactiveBackground()
public ColorUIResource getWindowTitleInactiveForeground()
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |