com.jgoodies.looks.plastic
public class PlasticLookAndFeel extends MetalLookAndFeel
Version: $Revision: 1.36 $
Field Summary | |
---|---|
static String | BORDER_STYLE_KEY
Client property key to set a border style - shadows the header style. |
static String | DEFAULT_THEME_KEY
A System property key to set the default theme. |
static String | HIGH_CONTRAST_FOCUS_ENABLED_KEY
A System property key that indicates that the high contrast
focus colors shall be choosen - if applicable.
|
static String | IS_3D_KEY
Client property key to disable the pseudo 3D effect. |
static String | TAB_STYLE_DEFAULT_VALUE
A System property value that indicates that Plastic shall render
tabs in the Plastic 1.0 style. |
protected static String | TAB_STYLE_KEY
A System property key for the rendering style of the Plastic
TabbedPane. |
static String | TAB_STYLE_METAL_VALUE
A System property value that indicates that Plastic shall
render tabs in the Metal L&F style. |
Constructor Summary | |
---|---|
PlasticLookAndFeel()
Constructs the PlasticLookAndFeel, creates the default theme
and sets it as current Plastic theme. |
Method Summary | |
---|---|
static PlasticTheme | createMyDefaultTheme()
Creates and returns the default color theme. |
protected static PlasticTheme | createTheme(String themeName)
Creates and returns a color theme from the specified theme name.
|
static ColorUIResource | getControl() |
static ColorUIResource | getControlDarkShadow() |
static ColorUIResource | getControlHighlight() |
String | getDescription() |
Icon | getDisabledIcon(JComponent component, Icon icon)
Returns an icon with a disabled appearance. |
static ColorUIResource | getFocusColor() |
static FontPolicy | getFontPolicy()
Looks up and retrieves the FontPolicy used
by the JGoodies Plastic Look&Feel family.
|
static boolean | getHighContrastFocusColorsEnabled() |
String | getID() |
static List | getInstalledThemes()
Lazily initializes and returns the List of installed
color themes.
|
static BorderUIResource | getInternalFrameBorder() |
static ColorUIResource | getMenuItemBackground() |
static ColorUIResource | getMenuItemSelectedBackground() |
static ColorUIResource | getMenuItemSelectedForeground() |
static MicroLayoutPolicy | getMicroLayoutPolicy()
Looks up and retrieves the MicroLayoutPolicy used by
the JGoodies Plastic Look&Fs.
|
String | getName() |
static BorderUIResource | getPaletteBorder() |
static PlasticTheme | getPlasticTheme()
Lazily initializes and returns the PlasticTheme.
|
static ColorUIResource | getPrimaryControl() |
static ColorUIResource | getPrimaryControlDarkShadow() |
static ColorUIResource | getPrimaryControlHighlight() |
static ColorUIResource | getPrimaryControlInfo() |
static ColorUIResource | getPrimaryControlShadow() |
static ColorUIResource | getSimpleInternalFrameBackground() |
static ColorUIResource | getSimpleInternalFrameForeground() |
static String | getTabStyle() |
static ColorUIResource | getTitleTextColor() |
static FontUIResource | getTitleTextFont() |
static ColorUIResource | getWindowTitleBackground() |
static ColorUIResource | getWindowTitleForeground() |
static ColorUIResource | getWindowTitleInactiveBackground() |
static ColorUIResource | getWindowTitleInactiveForeground() |
protected void | initClassDefaults(UIDefaults table)
Initializes the class defaults, that is, overrides some UI delegates
with JGoodies Plastic implementations.
|
protected void | initComponentDefaults(UIDefaults table) |
void | initialize()
Invoked during UIManager#setLookAndFeel . |
protected void | initSystemColorDefaults(UIDefaults table)
Unlike my superclass I register a unified shadow color.
|
protected static void | installDefaultThemes()
Install the default color themes. |
static void | installTheme(PlasticTheme theme)
Installs a color theme.
|
protected boolean | is3DEnabled() |
static boolean | isSelectTextOnKeyboardFocusGained() |
static void | set3DEnabled(boolean b) |
static void | setFontPolicy(FontPolicy fontPolicy)
Sets the FontPolicy to be used with the JGoodies Plastic L&F
family. |
static void | setHighContrastFocusColorsEnabled(boolean b) |
static void | setMicroLayoutPolicy(MicroLayout microLayoutPolicy)
Sets the MicroLayoutPolicy to be used with the JGoodies Plastic L&Fs.
|
static void | setPlasticTheme(PlasticTheme theme)
Sets the theme for colors and fonts used by the Plastic L&F. After setting the theme, you need to re-install the Look&Feel, as well as update the UI's of any previously created components - just as if you'd change the Look&Feel. |
static void | setSelectTextOnKeyboardFocusGained(boolean b)
Sets whether text field text shall be selected when it gains focus
via the keyboard. |
static void | setTabStyle(String tabStyle) |
void | uninitialize()
Invoked during UIManager#setLookAndFeel . |
Returns: the default color theme for the current environemt
Parameters: themeName the unqualified name of the theme to create
Returns: the associated color theme or null
in case of
a problem
This method will be used only on JDK 5.0 and later.
Parameters: component the component that will display the icon, may be null. icon the icon to generate disabled icon from.
Returns: disabled icon, or null if a suitable icon can not be generated.
Returns: the FontPolicy set for this Look&feel - if any, the FontPolicy specified in the system properties or UIDefaults - if any, or the default Plastic font policy.
See Also: PlasticLookAndFeel PLASTIC_FONT_POLICY_KEY FontPolicies customSettingsPolicy getDefaultPlasticPolicy
List
of installed
color themes.
Returns: a list of installed color/font themes
Returns: the MicroLayoutPolicy set for this Look&feel - if any, or the default Plastic MicroLayoutPolicy.
See Also: PlasticLookAndFeel PLASTIC_MICRO_LAYOUT_POLICY_KEY MicroLayoutPolicies
MetalLookAndFeel#getCurrentTheme
.
In Java 1.4 it is requested from the UIManager.
Both access methods use an AppContext to store the theme,
so that applets in different contexts don't share the theme.
Returns: the current PlasticTheme
Parameters: table the UIDefaults table to work with
See Also: javax.swing.plaf.basic.BasicLookAndFeel#getDefaults()
UIManager#setLookAndFeel
. In addition
to the superclass behavior, we install the ShadowPopupFactory.
See Also: PlasticLookAndFeel
Parameters: table the UIDefaults table to work with
Parameters: theme the theme to install
null
, the default will
be reset.
Parameters: fontPolicy the FontPolicy to be used with
the JGoodies Plastic L&F family, or null
to reset
to the default
See Also: getFontPolicy PLASTIC_FONT_POLICY_KEY
null
, the default will be reset.
Parameters: microLayoutPolicy the MicroLayoutPolicy to be used with
the JGoodies Plastic L&Fs, or null
to reset
to the default
See Also: getMicroLayoutPolicy PLASTIC_MICRO_LAYOUT_POLICY_KEY
After setting the theme, you need to re-install the Look&Feel, as well as update the UI's of any previously created components - just as if you'd change the Look&Feel.
Parameters: theme the PlasticTheme to be set
Throws: NullPointerException if the theme is null.
See Also: getPlasticTheme
Parameters: b
UIManager#setLookAndFeel
. In addition
to the superclass behavior, we uninstall the ShadowPopupFactory.
See Also: PlasticLookAndFeel