Look and feel customizations interface.
For various look and feels, there is a need to customize colors,
borders etc. to provide 'native-like' UI.
Implementers of this interface should install and uninstall custom
UI elements into UIManager on request.
There are three types of customization possible:
Guaranteeing values code expects to be non-null but the look and feel (i.e. GTK) may not provide.
Customizing values that are already present (such as changing the default font for labels)
Adding values used by custom components which are not part of Swing, but use UIDefaults to fetch their colors,
fonts, uis, borders, etc.
Each type of customization is a separate method on this interface. On startup, first the customizations for
all look and feels are run, then the customizations for the specific look and feel that is currently set.
A non-standard look and feel that wishes to provide some custom colors for NetBeans window system, etc., can
do so by placing an instance of its implementation of LFCustoms into UIDefaults under the key
"Nb.[return value of the custom look and feel's getID() method]LFCustoms".
Given that all this class does is return some keys and values, in the future it may be replaced by an
XML file similar to theme files.
This class defines a number of relatively self-explanatory UIManager keys for things used in various parts
of NetBeans.
author: Dafe Simonek, Tim Boudreau
additionalKeys() LFCustoms implementations which use UIBootstrapValue.Lazy should return
any keys that it will install here, so they can be merged into the list
of things to clear on L&F change.
createGuaranteedKeysAndValues() Provide UIDefaults entries for things which components rely on being non-null, but which may be null on some
look and feels or some versions of the look and feel in question.
createLookAndFeelCustomizationKeysAndValues() Create any objects to put into UIDefaults to replace values normally supplied by the look
and feel, to customize application appearance.
void
disposeValues() Dispose the value part of all arrays - no need to hold onto lazy value instances
or GuaranteedValue instances - they should disappear once dereferenced.
final protected static String CUSTOM_FONT_SIZE(Code)
Integer value which LFCustoms will read. On startup, if a
custom font size is specified, the core will put this into UIDefaults.
We then read it out if present and use it to set up a custom font size.
DEFAULT_FONT_SIZE
final protected static String DEFAULT_FONT_SIZE(Code)
DESKTOP_BACKGROUND
final protected static String DESKTOP_BACKGROUND(Code)
DESKTOP_BORDER
final protected static String DESKTOP_BORDER(Code)
DESKTOP_SPLITPANE_BORDER
final protected static String DESKTOP_SPLITPANE_BORDER(Code)
EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS
final protected static String EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS(Code)
EDITOR_STATUS_INNER_BORDER
final protected static String EDITOR_STATUS_INNER_BORDER(Code)
EDITOR_STATUS_LEFT_BORDER
final protected static String EDITOR_STATUS_LEFT_BORDER(Code)
EDITOR_STATUS_ONLYONEBORDER
final protected static String EDITOR_STATUS_ONLYONEBORDER(Code)
EDITOR_STATUS_RIGHT_BORDER
final protected static String EDITOR_STATUS_RIGHT_BORDER(Code)
EDITOR_TABBED_CONTAINER_UI
final protected static String EDITOR_TABBED_CONTAINER_UI(Code)
EDITOR_TAB_CONTENT_BORDER
final protected static String EDITOR_TAB_CONTENT_BORDER(Code)
EDITOR_TAB_DISPLAYER_UI
final protected static String EDITOR_TAB_DISPLAYER_UI(Code)
EDITOR_TAB_OUTER_BORDER
final protected static String EDITOR_TAB_OUTER_BORDER(Code)
EDITOR_TAB_TABS_BORDER
final protected static String EDITOR_TAB_TABS_BORDER(Code)
EDITOR_TOOLBAR_BORDER
final protected static String EDITOR_TOOLBAR_BORDER(Code)
ERROR_FOREGROUND
final protected static String ERROR_FOREGROUND(Code)
EXPLORER_FOLDER_ICON
final protected static String EXPLORER_FOLDER_ICON(Code)
EXPLORER_FOLDER_OPENED_ICON
final protected static String EXPLORER_FOLDER_OPENED_ICON(Code)
EXPLORER_MINISTATUSBAR_BORDER
final protected static String EXPLORER_MINISTATUSBAR_BORDER(Code)
EXPLORER_STATUS_BORDER
final protected static String EXPLORER_STATUS_BORDER(Code)
LFCustoms implementations which use UIBootstrapValue.Lazy should return
any keys that it will install here, so they can be merged into the list
of things to clear on L&F change.
an array of objects or null.
Get all keys this LFCustoms installs in UIManager. This is used to
delete unneeded elements from UIManager if the look and feel is changed
on the fly (for example, the user switches Windows from Classic to XP
look).
Create any objects to put into UIDefaults for custom components which use UIManager to find values, UIs, etc.
An array of key-value pairs to put into UIDefaults
Provide UIDefaults entries for things which components rely on being non-null, but which may be null on some
look and feels or some versions of the look and feel in question. For example, if you have a component that
sets its background by calling UIManager.get("controlShadow"), you need to guarantee
that this will be non-null when fetched from UIManager - but look and feels do not guarantee this. The typical
pattern here is to put into UIManager an instance of GuaranteedValue, i.e.
new GuaranteedValue ("controlShadow", Color.GRAY) which will take on the value already present
if it's there, and provide a fallback if it's not.
See Also:org.netbeans.swing.plaf.util.GuaranteedValue An array of key-value pairs to put into UIDefaults
Create any objects to put into UIDefaults to replace values normally supplied by the look
and feel, to customize application appearance.
An array of key-value pairs to put into UIDefaults
Dispose the value part of all arrays - no need to hold onto lazy value instances
or GuaranteedValue instances - they should disappear once dereferenced. We only
need the keys to uninstall the customizations later.