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. 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.
DefaultMetalTheme, OceanTheme, MetalLookAndFeel#setCurrentTheme
| Modifier and Type | Field and Description |
|---|---|
| private static ColorUIResource | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static ColorUIResource | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCustomEntriesToTable(UIDefaults
the table)UIDefaults to add the values toAdds values specific to this theme to the defaults table. |
| public ColorUIResource | Returns: the accelerator foreground colorReturns the accelerator foreground color. |
| public ColorUIResource | Returns: the accelerator selected foreground colorReturns the accelerator selected foreground color. |
| protected ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public abstract FontUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | Returns: the inactive control text colorReturns the inactive control text color. |
| public ColorUIResource | Returns: the inactive system text colorReturns the inactive system text color. |
| public ColorUIResource | |
| public ColorUIResource | Returns: the menu disabled foreground colorReturns the menu disabled foreground color. |
| public ColorUIResource | |
| public ColorUIResource | Returns: the menu selected background colorReturns the menu selected background color. |
| public ColorUIResource | Returns: the menu selected foreground colorReturns the menu selected foreground color. |
| public abstract FontUIResource | |
| public abstract String | |
| protected abstract ColorUIResource | |
| protected abstract ColorUIResource | |
| protected abstract ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | Returns: the primary control dark shadow colorReturns the primary control dark shadow color. |
| public ColorUIResource | Returns: the primary control highlight colorReturns the primary control highlight color. |
| public ColorUIResource | Returns: the primary control info colorReturns the primary control info color. |
| public ColorUIResource | Returns: the primary control shadow colorReturns the primary control shadow color. |
| protected abstract ColorUIResource | |
| protected abstract ColorUIResource | |
| protected abstract ColorUIResource | |
| public ColorUIResource | Returns: the separator background colorReturns the separator background color. |
| public ColorUIResource | Returns: the separator foreground colorReturns the separator foreground color. |
| public abstract FontUIResource | |
| public ColorUIResource | |
| public abstract FontUIResource | |
| public ColorUIResource | |
| public ColorUIResource | |
| public abstract FontUIResource | |
| protected ColorUIResource | |
| public ColorUIResource | |
| public ColorUIResource | Returns: the window title background colorReturns the window title background color. |
| public abstract FontUIResource | |
| public ColorUIResource | Returns: the window title foreground colorReturns the window title foreground color. |
| public ColorUIResource | Returns: the window title inactive background colorReturns the window title inactive background color. |
| public ColorUIResource | Returns: the window title inactive foreground colorReturns the window title inactive foreground color. |
| pack-priv void | |
| pack-priv boolean |
| black | back to summary |
|---|---|
| private static ColorUIResource black | |
| CONTROL_TEXT_FONT | back to summary |
|---|---|
| pack-priv static final int CONTROL_TEXT_FONT | |
| MENU_TEXT_FONT | back to summary |
|---|---|
| pack-priv static final int MENU_TEXT_FONT | |
| SUB_TEXT_FONT | back to summary |
|---|---|
| pack-priv static final int SUB_TEXT_FONT | |
| SYSTEM_TEXT_FONT | back to summary |
|---|---|
| pack-priv static final int SYSTEM_TEXT_FONT | |
| USER_TEXT_FONT | back to summary |
|---|---|
| pack-priv static final int USER_TEXT_FONT | |
| white | back to summary |
|---|---|
| pack-priv static ColorUIResource white | |
| WINDOW_TITLE_FONT | back to summary |
|---|---|
| pack-priv static final int WINDOW_TITLE_FONT | |
| MetalTheme | back to summary |
|---|---|
| protected MetalTheme() Constructor for subclasses to call. | |
| addCustomEntriesToTable | back to summary |
|---|---|
| public 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 from
This implementation does nothing; it is provided for subclasses that wish to customize the defaults table.
| |
| getAcceleratorForeground | back to summary |
|---|---|
| public ColorUIResource getAcceleratorForeground() Returns the accelerator foreground color. This
returns the value of
| |
| getAcceleratorSelectedForeground | back to summary |
|---|---|
| public ColorUIResource getAcceleratorSelectedForeground() Returns the accelerator selected foreground color. This
returns the value of
| |
| getBlack | back to summary |
|---|---|
| protected ColorUIResource getBlack() Returns the black color. This returns opaque black
(
| |
| getControl | back to summary |
|---|---|
| public ColorUIResource getControl() Returns the control color. This returns the value of
| |
| getControlDarkShadow | back to summary |
|---|---|
| public ColorUIResource getControlDarkShadow() Returns the control dark shadow color. This returns
the value of
| |
| getControlDisabled | back to summary |
|---|---|
| public ColorUIResource getControlDisabled() Returns the control disabled color. This returns
the value of
| |
| getControlHighlight | back to summary |
|---|---|
| public ColorUIResource getControlHighlight() Returns the control highlight color. This returns
the value of
| |
| getControlInfo | back to summary |
|---|---|
| public ColorUIResource getControlInfo() Returns the control info color. This returns
the value of
| |
| getControlShadow | back to summary |
|---|---|
| public ColorUIResource getControlShadow() Returns the control shadow color. This returns
the value of
| |
| getControlTextColor | back to summary |
|---|---|
| public ColorUIResource getControlTextColor() Returns the control text color. This returns the value of
| |
| getControlTextFont | back to summary |
|---|---|
| public abstract FontUIResource getControlTextFont() Returns the control text font.
| |
| getDesktopColor | back to summary |
|---|---|
| public ColorUIResource getDesktopColor() Returns the desktop color. This returns the value of
| |
| getFocusColor | back to summary |
|---|---|
| public ColorUIResource getFocusColor() Returns the focus color. This returns the value of
| |
| getHighlightedTextColor | back to summary |
|---|---|
| public ColorUIResource getHighlightedTextColor() Returns the highlighted text color. This returns the value of
| |
| getInactiveControlTextColor | back to summary |
|---|---|
| public ColorUIResource getInactiveControlTextColor() Returns the inactive control text color. This returns the value of
| |
| getInactiveSystemTextColor | back to summary |
|---|---|
| public ColorUIResource getInactiveSystemTextColor() Returns the inactive system text color. This returns the value of
| |
| getMenuBackground | back to summary |
|---|---|
| public ColorUIResource getMenuBackground() Returns the menu background color. This
returns the value of
| |
| getMenuDisabledForeground | back to summary |
|---|---|
| public ColorUIResource getMenuDisabledForeground() Returns the menu disabled foreground color. This
returns the value of
| |
| getMenuForeground | back to summary |
|---|---|
| public ColorUIResource getMenuForeground() Returns the menu foreground color. This
returns the value of
| |
| getMenuSelectedBackground | back to summary |
|---|---|
| public ColorUIResource getMenuSelectedBackground() Returns the menu selected background color. This
returns the value of
| |
| getMenuSelectedForeground | back to summary |
|---|---|
| public ColorUIResource getMenuSelectedForeground() Returns the menu selected foreground color. This
returns the value of
| |
| getMenuTextFont | back to summary |
|---|---|
| public abstract FontUIResource getMenuTextFont() Returns the menu text font.
| |
| getName | back to summary |
|---|---|
| public abstract String getName() Returns the name of this theme.
| |
| getPrimary1 | back to summary |
|---|---|
| protected abstract ColorUIResource getPrimary1() Returns the primary 1 color.
| |
| getPrimary2 | back to summary |
|---|---|
| protected abstract ColorUIResource getPrimary2() Returns the primary 2 color.
| |
| getPrimary3 | back to summary |
|---|---|
| protected abstract ColorUIResource getPrimary3() Returns the primary 3 color.
| |
| getPrimaryControl | back to summary |
|---|---|
| public ColorUIResource getPrimaryControl() Returns the primary control color. This returns
the value of
| |
| getPrimaryControlDarkShadow | back to summary |
|---|---|
| public ColorUIResource getPrimaryControlDarkShadow() Returns the primary control dark shadow color. This
returns the value of
| |
| getPrimaryControlHighlight | back to summary |
|---|---|
| public ColorUIResource getPrimaryControlHighlight() Returns the primary control highlight color. This
returns the value of
| |
| getPrimaryControlInfo | back to summary |
|---|---|
| public ColorUIResource getPrimaryControlInfo() Returns the primary control info color. This
returns the value of
| |
| getPrimaryControlShadow | back to summary |
|---|---|
| public ColorUIResource getPrimaryControlShadow() Returns the primary control shadow color. This returns
the value of
| |
| getSecondary1 | back to summary |
|---|---|
| protected abstract ColorUIResource getSecondary1() Returns the secondary 1 color.
| |
| getSecondary2 | back to summary |
|---|---|
| protected abstract ColorUIResource getSecondary2() Returns the secondary 2 color.
| |
| getSecondary3 | back to summary |
|---|---|
| protected abstract ColorUIResource getSecondary3() Returns the secondary 3 color.
| |
| getSeparatorBackground | back to summary |
|---|---|
| public ColorUIResource getSeparatorBackground() Returns the separator background color. This
returns the value of
| |
| getSeparatorForeground | back to summary |
|---|---|
| public ColorUIResource getSeparatorForeground() Returns the separator foreground color. This
returns the value of
| |
| getSubTextFont | back to summary |
|---|---|
| public abstract FontUIResource getSubTextFont() Returns the sub-text font.
| |
| getSystemTextColor | back to summary |
|---|---|
| public ColorUIResource getSystemTextColor() Returns the system text color. This returns the value of
| |
| getSystemTextFont | back to summary |
|---|---|
| public abstract FontUIResource getSystemTextFont() Returns the system text font.
| |
| getTextHighlightColor | back to summary |
|---|---|
| public ColorUIResource getTextHighlightColor() Returns the text highlight color. This returns the value of
| |
| getUserTextColor | back to summary |
|---|---|
| public ColorUIResource getUserTextColor() Returns the user text color. This returns the value of
| |
| getUserTextFont | back to summary |
|---|---|
| public abstract FontUIResource getUserTextFont() Returns the user text font.
| |
| getWhite | back to summary |
|---|---|
| protected ColorUIResource getWhite() Returns the white color. This returns opaque white
(
| |
| getWindowBackground | back to summary |
|---|---|
| public ColorUIResource getWindowBackground() Returns the window background color. This returns the value of
| |
| getWindowTitleBackground | back to summary |
|---|---|
| public ColorUIResource getWindowTitleBackground() Returns the window title background color. This returns the value of
| |
| getWindowTitleFont | back to summary |
|---|---|
| public abstract FontUIResource getWindowTitleFont() Returns the window title font.
| |
| getWindowTitleForeground | back to summary |
|---|---|
| public ColorUIResource getWindowTitleForeground() Returns the window title foreground color. This returns the value of
| |
| getWindowTitleInactiveBackground | back to summary |
|---|---|
| public ColorUIResource getWindowTitleInactiveBackground() Returns the window title inactive background color. This
returns the value of
| |
| getWindowTitleInactiveForeground | back to summary |
|---|---|
| public ColorUIResource getWindowTitleInactiveForeground() Returns the window title inactive foreground color. This
returns the value of
| |
| install | back to summary |
|---|---|
| pack-priv 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 | back to summary |
|---|---|
| pack-priv boolean isSystemTheme() Returns true if this is a theme provided by the core platform. | |