站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

LFCustoms (Look & Feel Customization Library) - NetBeans API Javadoc (Current Development Version)

org.netbeans.swing.plaf 1.6

org.netbeans.swing.plaf
Class LFCustoms

java.lang.Object
  extended by org.netbeans.swing.plaf.LFCustoms

public abstract class LFCustoms
extends Object

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:

  1. Guaranteeing values code expects to be non-null but the look and feel (i.e. GTK) may not provide.
  2. Customizing values that are already present (such as changing the default font for labels)
  3. 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.


Field Summary
static String CONTROLFONT
           
protected static String CUSTOM_FONT_SIZE
          Integer value which LFCustoms will read.
protected static String DEFAULT_FONT_SIZE
           
protected static String DESKTOP_BACKGROUND
           
protected static String DESKTOP_BORDER
           
protected static String DESKTOP_SPLITPANE_BORDER
           
protected static String EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS
           
protected static String EDITOR_STATUS_INNER_BORDER
           
protected static String EDITOR_STATUS_LEFT_BORDER
           
protected static String EDITOR_STATUS_ONLYONEBORDER
           
protected static String EDITOR_STATUS_RIGHT_BORDER
           
protected static String EDITOR_TAB_CONTENT_BORDER
           
protected static String EDITOR_TAB_DISPLAYER_UI
           
protected static String EDITOR_TAB_OUTER_BORDER
           
protected static String EDITOR_TAB_TABS_BORDER
           
protected static String EDITOR_TABBED_CONTAINER_UI
           
protected static String EDITOR_TOOLBAR_BORDER
           
protected static String ERROR_FOREGROUND
           
protected static String EXPLORER_FOLDER_ICON
           
protected static String EXPLORER_FOLDER_OPENED_ICON
           
protected static String EXPLORER_MINISTATUSBAR_BORDER
           
protected static String EXPLORER_STATUS_BORDER
           
static String LISTFONT
           
static String MENUFONT
           
protected static String OUTPUT_BACKGROUND
           
protected static String OUTPUT_FOREGROUND
           
protected static String OUTPUT_HYPERLINK_FOREGROUND
           
protected static String OUTPUT_SELECTION_BACKGROUND
           
static String PANELFONT
           
static String PROGRESS_CANCEL_BUTTON_ICON
           
static String PROGRESS_CANCEL_BUTTON_PRESSED_ICON
           
static String PROGRESS_CANCEL_BUTTON_ROLLOVER_ICON
           
protected static String PROPERTYSHEET_BOOTSTRAP
           
protected static String PROPSHEET_ALTERNATE_ROW_COLOR
           
protected static String PROPSHEET_BACKGROUND
           
protected static String PROPSHEET_BUTTON_COLOR
           
protected static String PROPSHEET_BUTTON_FOREGROUND
           
protected static String PROPSHEET_DISABLED_FOREGROUND
           
protected static String PROPSHEET_ICON_MARGIN
           
protected static String PROPSHEET_ROWHEIGHT
           
protected static String PROPSHEET_SELECTED_SET_BACKGROUND
           
protected static String PROPSHEET_SELECTED_SET_FOREGROUND
           
protected static String PROPSHEET_SELECTION_BACKGROUND
           
protected static String PROPSHEET_SELECTION_FOREGROUND
           
protected static String PROPSHEET_SET_BACKGROUND
           
protected static String PROPSHEET_SET_FOREGROUND
           
static String SCROLLPANE_BORDER
           
static String SCROLLPANE_BORDER_COLOR
           
protected static String SLIDING_BUTTON_UI
           
protected static String SLIDING_TAB_BUTTON_UI
           
protected static String SLIDING_TAB_CONTENT_BORDER
           
protected static String SLIDING_TAB_DISPLAYER_UI
           
protected static String SLIDING_TAB_OUTER_BORDER
           
protected static String SLIDING_TAB_TABS_BORDER
           
static String SPINNERFONT
           
static String SUBFONT
           
static String SYSTEMFONT
           
protected static String TAB_ACTIVE_SELECTION_BACKGROUND
           
protected static String TAB_ACTIVE_SELECTION_FOREGROUND
           
protected static String TAB_SELECTION_BACKGROUND
           
protected static String TAB_SELECTION_FOREGROUND
           
protected static String TOOLBAR_UI
           
static String TREEFONT
           
static String USERFONT
           
protected static String VIEW_TAB_CONTENT_BORDER
           
protected static String VIEW_TAB_DISPLAYER_UI
           
protected static String VIEW_TAB_OUTER_BORDER
           
protected static String VIEW_TAB_TABS_BORDER
           
protected static String WARNING_FOREGROUND
           
static String WINDOWTITLEFONT
           
protected static String WORKPLACE_FILL
           
 
Constructor Summary
LFCustoms()
           
 
Method Summary
protected  Object[] 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.
 Object[] createApplicationSpecificKeysAndValues()
          Create any objects to put into UIDefaults for custom components which use UIManager to find values, UIs, etc.
 Object[] 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.
 Object[] createLookAndFeelCustomizationKeysAndValues()
          Create any objects to put into UIDefaults to replace values normally supplied by the look and feel, to customize application appearance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKPLACE_FILL

protected static final String WORKPLACE_FILL
See Also:
Constant Field Values

CUSTOM_FONT_SIZE

protected static final String CUSTOM_FONT_SIZE
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.

See Also:
Constant Field Values

DEFAULT_FONT_SIZE

protected static final String DEFAULT_FONT_SIZE
See Also:
Constant Field Values

EDITOR_STATUS_LEFT_BORDER

protected static final String EDITOR_STATUS_LEFT_BORDER
See Also:
Constant Field Values

EDITOR_STATUS_INNER_BORDER

protected static final String EDITOR_STATUS_INNER_BORDER
See Also:
Constant Field Values

EDITOR_STATUS_RIGHT_BORDER

protected static final String EDITOR_STATUS_RIGHT_BORDER
See Also:
Constant Field Values

EDITOR_STATUS_ONLYONEBORDER

protected static final String EDITOR_STATUS_ONLYONEBORDER
See Also:
Constant Field Values

EDITOR_TOOLBAR_BORDER

protected static final String EDITOR_TOOLBAR_BORDER
See Also:
Constant Field Values

EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS

protected static final String EDITOR_ERRORSTRIPE_SCROLLBAR_INSETS
See Also:
Constant Field Values

EXPLORER_STATUS_BORDER

protected static final String EXPLORER_STATUS_BORDER
See Also:
Constant Field Values

EXPLORER_FOLDER_ICON

protected static final String EXPLORER_FOLDER_ICON
See Also:
Constant Field Values

EXPLORER_FOLDER_OPENED_ICON

protected static final String EXPLORER_FOLDER_OPENED_ICON
See Also:
Constant Field Values

DESKTOP_BORDER

protected static final String DESKTOP_BORDER
See Also:
Constant Field Values

SCROLLPANE_BORDER

public static final String SCROLLPANE_BORDER
See Also:
Constant Field Values

TOOLBAR_UI

protected static final String TOOLBAR_UI
See Also:
Constant Field Values

DESKTOP_BACKGROUND

protected static final String DESKTOP_BACKGROUND
See Also:
Constant Field Values

SCROLLPANE_BORDER_COLOR

public static final String SCROLLPANE_BORDER_COLOR
See Also:
Constant Field Values

OUTPUT_SELECTION_BACKGROUND

protected static final String OUTPUT_SELECTION_BACKGROUND
See Also:
Constant Field Values

OUTPUT_HYPERLINK_FOREGROUND

protected static final String OUTPUT_HYPERLINK_FOREGROUND
See Also:
Constant Field Values

OUTPUT_BACKGROUND

protected static final String OUTPUT_BACKGROUND
See Also:
Constant Field Values

OUTPUT_FOREGROUND

protected static final String OUTPUT_FOREGROUND
See Also:
Constant Field Values

PROPSHEET_ALTERNATE_ROW_COLOR

protected static final String PROPSHEET_ALTERNATE_ROW_COLOR
See Also:
Constant Field Values

PROPSHEET_SET_BACKGROUND

protected static final String PROPSHEET_SET_BACKGROUND
See Also:
Constant Field Values

PROPSHEET_SELECTED_SET_BACKGROUND

protected static final String PROPSHEET_SELECTED_SET_BACKGROUND
See Also:
Constant Field Values

PROPSHEET_SET_FOREGROUND

protected static final String PROPSHEET_SET_FOREGROUND
See Also:
Constant Field Values

PROPSHEET_SELECTED_SET_FOREGROUND

protected static final String PROPSHEET_SELECTED_SET_FOREGROUND
See Also:
Constant Field Values

PROPSHEET_DISABLED_FOREGROUND

protected static final String PROPSHEET_DISABLED_FOREGROUND
See Also:
Constant Field Values

PROPSHEET_SELECTION_BACKGROUND

protected static final String PROPSHEET_SELECTION_BACKGROUND
See Also:
Constant Field Values

PROPSHEET_SELECTION_FOREGROUND

protected static final String PROPSHEET_SELECTION_FOREGROUND
See Also:
Constant Field Values

PROPSHEET_BUTTON_FOREGROUND

protected static final String PROPSHEET_BUTTON_FOREGROUND
See Also:
Constant Field Values

PROPSHEET_BUTTON_COLOR

protected static final String PROPSHEET_BUTTON_COLOR
See Also:
Constant Field Values

PROPSHEET_BACKGROUND

protected static final String PROPSHEET_BACKGROUND
See Also:
Constant Field Values

PROPSHEET_ICON_MARGIN

protected static final String PROPSHEET_ICON_MARGIN
See Also:
Constant Field Values

PROPSHEET_ROWHEIGHT

protected static final String PROPSHEET_ROWHEIGHT
See Also:
Constant Field Values

ERROR_FOREGROUND

protected static final String ERROR_FOREGROUND
See Also:
Constant Field Values

WARNING_FOREGROUND

protected static final String WARNING_FOREGROUND
See Also:
Constant Field Values

EDITOR_TABBED_CONTAINER_UI

protected static final String EDITOR_TABBED_CONTAINER_UI
See Also:
Constant Field Values

EDITOR_TAB_DISPLAYER_UI

protected static final String EDITOR_TAB_DISPLAYER_UI
See Also:
Constant Field Values

VIEW_TAB_DISPLAYER_UI

protected static final String VIEW_TAB_DISPLAYER_UI
See Also:
Constant Field Values

SLIDING_TAB_DISPLAYER_UI

protected static final String SLIDING_TAB_DISPLAYER_UI
See Also:
Constant Field Values

SLIDING_TAB_BUTTON_UI

protected static final String SLIDING_TAB_BUTTON_UI
See Also:
Constant Field Values

SLIDING_BUTTON_UI

protected static final String SLIDING_BUTTON_UI
See Also:
Constant Field Values

EDITOR_TAB_CONTENT_BORDER

protected static final String EDITOR_TAB_CONTENT_BORDER
See Also:
Constant Field Values

EDITOR_TAB_TABS_BORDER

protected static final String EDITOR_TAB_TABS_BORDER
See Also:
Constant Field Values

EDITOR_TAB_OUTER_BORDER

protected static final String EDITOR_TAB_OUTER_BORDER
See Also:
Constant Field Values

VIEW_TAB_CONTENT_BORDER

protected static final String VIEW_TAB_CONTENT_BORDER
See Also:
Constant Field Values

VIEW_TAB_TABS_BORDER

protected static final String VIEW_TAB_TABS_BORDER
See Also:
Constant Field Values

VIEW_TAB_OUTER_BORDER

protected static final String VIEW_TAB_OUTER_BORDER
See Also:
Constant Field Values

SLIDING_TAB_CONTENT_BORDER

protected static final String SLIDING_TAB_CONTENT_BORDER
See Also:
Constant Field Values

SLIDING_TAB_TABS_BORDER

protected static final String SLIDING_TAB_TABS_BORDER
See Also:
Constant Field Values

SLIDING_TAB_OUTER_BORDER

protected static final String SLIDING_TAB_OUTER_BORDER
See Also:
Constant Field Values

TAB_ACTIVE_SELECTION_BACKGROUND

protected static final String TAB_ACTIVE_SELECTION_BACKGROUND
See Also:
Constant Field Values

TAB_ACTIVE_SELECTION_FOREGROUND

protected static final String TAB_ACTIVE_SELECTION_FOREGROUND
See Also:
Constant Field Values

TAB_SELECTION_FOREGROUND

protected static final String TAB_SELECTION_FOREGROUND
See Also:
Constant Field Values

TAB_SELECTION_BACKGROUND

protected static final String TAB_SELECTION_BACKGROUND
See Also:
Constant Field Values

EXPLORER_MINISTATUSBAR_BORDER

protected static final String EXPLORER_MINISTATUSBAR_BORDER
See Also:
Constant Field Values

DESKTOP_SPLITPANE_BORDER

protected static final String DESKTOP_SPLITPANE_BORDER
See Also:
Constant Field Values

PROPERTYSHEET_BOOTSTRAP

protected static final String PROPERTYSHEET_BOOTSTRAP
See Also:
Constant Field Values

CONTROLFONT

public static final String CONTROLFONT
See Also:
Constant Field Values

SYSTEMFONT

public static final String SYSTEMFONT
See Also:
Constant Field Values

USERFONT

public static final String USERFONT
See Also:
Constant Field Values

MENUFONT

public static final String MENUFONT
See Also:
Constant Field Values

WINDOWTITLEFONT

public static final String WINDOWTITLEFONT
See Also:
Constant Field Values

SUBFONT

public static final String SUBFONT
See Also:
Constant Field Values

LISTFONT

public static final String LISTFONT
See Also:
Constant Field Values

TREEFONT

public static final String TREEFONT
See Also:
Constant Field Values

PANELFONT

public static final String PANELFONT
See Also:
Constant Field Values

SPINNERFONT

public static final String SPINNERFONT
See Also:
Constant Field Values

PROGRESS_CANCEL_BUTTON_ICON

public static final String PROGRESS_CANCEL_BUTTON_ICON
See Also:
Constant Field Values

PROGRESS_CANCEL_BUTTON_ROLLOVER_ICON

public static final String PROGRESS_CANCEL_BUTTON_ROLLOVER_ICON
See Also:
Constant Field Values

PROGRESS_CANCEL_BUTTON_PRESSED_ICON

public static final String PROGRESS_CANCEL_BUTTON_PRESSED_ICON
See Also:
Constant Field Values
Constructor Detail

LFCustoms

public LFCustoms()
Method Detail

additionalKeys

protected Object[] 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.

Returns:
an array of objects or null.

createLookAndFeelCustomizationKeysAndValues

public Object[] createLookAndFeelCustomizationKeysAndValues()
Create any objects to put into UIDefaults to replace values normally supplied by the look and feel, to customize application appearance.

Returns:
An array of key-value pairs to put into UIDefaults

createApplicationSpecificKeysAndValues

public Object[] createApplicationSpecificKeysAndValues()
Create any objects to put into UIDefaults for custom components which use UIManager to find values, UIs, etc.

Returns:
An array of key-value pairs to put into UIDefaults

createGuaranteedKeysAndValues

public Object[] 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. 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.

Returns:
An array of key-value pairs to put into UIDefaults
See Also:
GuaranteedValue

org.netbeans.swing.plaf 1.6

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.