Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jgoodies.plaf
Class Options

    java.lang.Object
      com.jgoodies.plaf.Options

public final class Options
extends Object

Provides access to several optional properties for the JGoodies L&Fs, either by a key to the `UIDefaults` table or via a method or both.

Version:
  $Revision: 1.11 $
Author:
  Karsten Lentzsch

Field Summary
`static String` | `CLEAR_LOOK_DEBUG`
`static String` | `CLEAR_LOOK_MODE_KEY`
`static String` | `CLEAR_LOOK_OFF`
`static String` | `CLEAR_LOOK_ON`
`static String` | `CLEAR_LOOK_POLICY_KEY`
`static String` | `CLEAR_LOOK_VERBOSE`
`static String` | `CONTROL_FONT_KEY`
`static String` | `DEFAULT_ICON_SIZE_KEY`
`static String` | `DEFAULT_LOOK_NAME`
`static String` | `EMBEDDED_TABS_KEY` A client property key for `JTabbedPane`s that indicates that tabs are painted with a special embedded appearance.
`static String` | `EXT_WINDOWS_NAME`
`static String` | `FONT_SIZE_HINTS_KEY`
`static String` | `HEADER_STYLE_KEY` Hint for the style: Single or Both, see `HeaderStyle`.
`static String` | `IS_ETCHED_KEY` Hint that the scroll pane border should be etched.
`static String` | `IS_NARROW_KEY` Hint that the button margin should be narrow.
`static String` | `MENU_FONT_KEY`
`static String` | `NO_CONTENT_BORDER_KEY` A client property key for `JTabbedPane`s that indicates that no content border shall be painted.
`static String` | `NO_ICONS_KEY` Hint that the menu items in the menu have no icons.
`static String` | `PLASTIC_NAME`
`static String` | `PLASTIC3D_NAME`
`static String` | `PLASTICXP_NAME`
`static String` | `POPUP_DROP_SHADOW_ENABLED_KEY`
`static String` | `TAB_ICONS_ENABLED_KEY`
`static String` | `TREE_LINE_STYLE_ANGLED_VALUE` A client property value for `JTree`s that indicates that lines shall be drawn.
`static String` | `TREE_LINE_STYLE_KEY` A client property key for `JTree`s.
`static String` | `TREE_LINE_STYLE_NONE_VALUE` A client property value for `JTree`s that indicates that lines shall be hidden.
`static String` | `USE_NARROW_BUTTONS_KEY`
`static String` | `USE_SYSTEM_FONTS_APP_KEY`
`static String` | `USE_SYSTEM_FONTS_KEY`

Method Summary
`static String` | `getCrossPlatformLookAndFeelClassName()` Returns the class name for a cross-platform `LookAndFeel`.
`static Dimension` | `getDefaultIconSize()` Returns the default icon size that is used in menus, menu items and toolbars.
`static FontSizeHints` | `getGlobalFontSizeHints()` Returns the global `FontSizeHints`, can be overriden by look specific setting.
`static String` | `getReplacementClassNameFor(String className)` Returns the class name that can be used to replace the specified `LookAndFeel` class name.
`static String` | `getSystemLookAndFeelClassName()` Returns the class name for a system specific `LookAndFeel`.
`static boolean` | `getUseNarrowButtons()` Checks and answers if we shall use narrow button margins of 4 pixels.
`static boolean` | `getUseSystemFonts()` Returns whether a hint is set in the `UIManager` that indicates, that a look&feel may use the native system fonts.
`static void` | `initializeDefaultReplacements()` Initializes some default class name replacements, that replace Sun's Java look and feel, and Sun's Windows look and feel by the appropriate JGoodies replacements.
`static boolean` | `isPopupDropShadowActive()` Checks and answers whether popup drop shadows are active.
`static boolean` | `isPopupDropShadowEnabled()` Checks and answers whether the optional drop shadows for `PopupMenus` are enabled or disabled.
`static boolean` | `isTabIconsEnabled()` Detects and answers if we shall use icons in `JTabbedPanes`.
`static void` | `putLookAndFeelReplacement(String original, String replacement)` Puts a replacement name for a given `LookAndFeel` class name in the list of all look and feel replacements.
`static void` | `removeLookAndFeelReplacement(String original)` Removes a replacement name for a given `LookAndFeel` class name from the list of all look and feel replacements.
`static void` | `setDefaultIconSize(Dimension defaultIconSize)` Sets the default icon size.
`static void` | `setGlobalFontSizeHints(FontSizeHints hints)` Sets the global `FontSizeHints`.
`static void` | `setPopupDropShadowEnabled(boolean b)` Enables or disables drop shadows in `PopupMenu`s.
`static void` | `setTabIconsEnabled(boolean b)` Enables or disables the use of icons in `JTabbedPane`s.
`static void` | `setUseNarrowButtons(boolean b)` Sets if we use narrow or standard button margins.
`static void` | `setUseSystemFonts(boolean useSystemFonts)` Sets a value in the `UIManager` to indicate, that a look&feel may use the native system fonts.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PLASTIC_NAME

    public static final String PLASTIC_NAME

See Also:
  Constant Field Values

### PLASTIC3D_NAME

    public static final String PLASTIC3D_NAME

See Also:
  Constant Field Values

### PLASTICXP_NAME

    public static final String PLASTICXP_NAME

See Also:
  Constant Field Values

### EXT_WINDOWS_NAME

    public static final String EXT_WINDOWS_NAME

See Also:
  Constant Field Values

### DEFAULT_LOOK_NAME

    public static final String DEFAULT_LOOK_NAME

See Also:
  Constant Field Values

### MENU_FONT_KEY

    public static final String MENU_FONT_KEY

See Also:
  Constant Field Values

### CONTROL_FONT_KEY

    public static final String CONTROL_FONT_KEY

See Also:
  Constant Field Values

### FONT_SIZE_HINTS_KEY

    public static final String FONT_SIZE_HINTS_KEY

See Also:
  Constant Field Values

### USE_SYSTEM_FONTS_KEY

    public static final String USE_SYSTEM_FONTS_KEY

See Also:
  Constant Field Values

### USE_SYSTEM_FONTS_APP_KEY

    public static final String USE_SYSTEM_FONTS_APP_KEY

See Also:
  Constant Field Values

### DEFAULT_ICON_SIZE_KEY

    public static final String DEFAULT_ICON_SIZE_KEY

See Also:
  Constant Field Values

### USE_NARROW_BUTTONS_KEY

    public static final String USE_NARROW_BUTTONS_KEY

See Also:
  Constant Field Values

### TAB_ICONS_ENABLED_KEY

    public static final String TAB_ICONS_ENABLED_KEY

See Also:
  Constant Field Values

### POPUP_DROP_SHADOW_ENABLED_KEY

    public static final String POPUP_DROP_SHADOW_ENABLED_KEY

See Also:
  Constant Field Values

### CLEAR_LOOK_MODE_KEY

    public static final String CLEAR_LOOK_MODE_KEY

See Also:
  Constant Field Values

### CLEAR_LOOK_POLICY_KEY

    public static final String CLEAR_LOOK_POLICY_KEY

See Also:
  Constant Field Values

### CLEAR_LOOK_OFF

    public static final String CLEAR_LOOK_OFF

### CLEAR_LOOK_ON

    public static final String CLEAR_LOOK_ON

### CLEAR_LOOK_VERBOSE

    public static final String CLEAR_LOOK_VERBOSE

### CLEAR_LOOK_DEBUG

    public static final String CLEAR_LOOK_DEBUG

### IS_NARROW_KEY

    public static final String IS_NARROW_KEY

  Hint that the button margin should be narrow.

  See Also:
    Constant Field Values

### IS_ETCHED_KEY

    public static final String IS_ETCHED_KEY

  Hint that the scroll pane border should be etched.

  See Also:
    Constant Field Values

### HEADER_STYLE_KEY

    public static final String HEADER_STYLE_KEY

  Hint for the style: Single or Both, see `HeaderStyle`.

  See Also:
    Constant Field Values

### NO_ICONS_KEY

    public static final String NO_ICONS_KEY

  Hint that the menu items in the menu have no icons.

  See Also:
    Constant Field Values

### TREE_LINE_STYLE_KEY

    public static final String TREE_LINE_STYLE_KEY

  A client property key for `JTree`s. Used with the angled and none style values.

  See Also:
    Constant Field Values

### TREE_LINE_STYLE_ANGLED_VALUE

    public static final String TREE_LINE_STYLE_ANGLED_VALUE

  A client property value for `JTree`s that indicates that lines shall be drawn.

  See Also:
    Constant Field Values

### TREE_LINE_STYLE_NONE_VALUE

    public static final String TREE_LINE_STYLE_NONE_VALUE

  A client property value for `JTree`s that indicates that lines shall be hidden.

  See Also:
    Constant Field Values

### NO_CONTENT_BORDER_KEY

    public static final String NO_CONTENT_BORDER_KEY

  A client property key for `JTabbedPane`s that indicates that no content border shall be painted. Supported by the Plastic look and feel family. This effect will be achieved also if the EMBEDDED property is true.

  See Also:
    Constant Field Values

### EMBEDDED_TABS_KEY

    public static final String EMBEDDED_TABS_KEY

  A client property key for `JTabbedPane`s that indicates that tabs are painted with a special embedded appearance. Supported by the Plastic look and feel family. This effect will be achieved also if the EMBEDDED property is true.

  See Also:
    Constant Field Values

Method Detail

### getUseSystemFonts

    public static boolean getUseSystemFonts()

  Returns whether a hint is set in the `UIManager` that indicates, that a look&feel may use the native system fonts.

  Returns:
    true if the UIManager indicates that system fonts shall be used
  See Also:
    `setUseSystemFonts(boolean)`

### setUseSystemFonts

    public static void setUseSystemFonts(boolean useSystemFonts)

  Sets a value in the `UIManager` to indicate, that a look&feel may use the native system fonts.

  Parameters:
    `useSystemFonts` - true to enable system fonts in the UIManager
  See Also:
    `getUseSystemFonts()`

### getDefaultIconSize

    public static Dimension getDefaultIconSize()

  Returns the default icon size that is used in menus, menu items and toolbars. Menu items that have no icon set are aligned using the default icon dimensions.

  Returns:
    the dimension of the default icon
  See Also:
    `setDefaultIconSize(Dimension)`

### setDefaultIconSize

    public static void setDefaultIconSize(Dimension defaultIconSize)

  Sets the default icon size.

  Parameters:
    `defaultIconSize` - the default icon size to set
  See Also:
    `getDefaultIconSize()`

### getGlobalFontSizeHints

    public static FontSizeHints getGlobalFontSizeHints()

  Returns the global `FontSizeHints`, can be overriden by look specific setting.

  Returns:
    the gobally used FontSizeHints object
  See Also:
    `setGlobalFontSizeHints(FontSizeHints)`

### setGlobalFontSizeHints

    public static void setGlobalFontSizeHints(FontSizeHints hints)

  Sets the global `FontSizeHints`.

  Parameters:
    `hints` - the FontSizeHints object to be used globally
  See Also:
    `getGlobalFontSizeHints()`

### getUseNarrowButtons

    public static boolean getUseNarrowButtons()

  Checks and answers if we shall use narrow button margins of 4 pixels. Sun's L&F implementations use a much wider button margin of 14 pixels, which leads to good button minimum width in the typical case.

  Using narrow button margins can potentially cause compatibility issues, so this feature must be switched on programmatically.

  If you use narrow margin, you should take care of minimum button width, either by the layout management or appropriate ButtonUI minimum widths.

  Returns:
    true if all buttons shall use narrow margins
  See Also:
    `setUseNarrowButtons(boolean)`

### setUseNarrowButtons

    public static void setUseNarrowButtons(boolean b)

  Sets if we use narrow or standard button margins.

  Parameters:
    `b` - true to use narrow button margins globally
  See Also:
    `getUseNarrowButtons()`

### isTabIconsEnabled

    public static boolean isTabIconsEnabled()

  Detects and answers if we shall use icons in `JTabbedPanes`. This has an effect only inside NetBeans, it will answer 'yes' if we are outside NetBeans.

  If the user has set a system property, we log a message about the choosen style.

  Returns:
    true if icons in tabbed panes are enabled, false if disabled
  See Also:
    `setTabIconsEnabled(boolean)`

### setTabIconsEnabled

    public static void setTabIconsEnabled(boolean b)

  Enables or disables the use of icons in `JTabbedPane`s.

  Parameters:
    `b` - true to enable icons in tabbed panes, false to disable them
  See Also:
    `isTabIconsEnabled()`

### isPopupDropShadowActive

    public static boolean isPopupDropShadowActive()

  Checks and answers whether popup drop shadows are active. This feature shall be inactive on platforms that provide native drop shadows, such as the Mac OS X. Otherwise the feature's enablement state is returned.

  Currently only the Mac OS X is detected as platform with native drop shadows.

  Returns:
    true if drop shadows are active, false if inactive
  See Also:
    `isPopupDropShadowEnabled()`, `setPopupDropShadowEnabled(boolean)`

### isPopupDropShadowEnabled

    public static boolean isPopupDropShadowEnabled()

  Checks and answers whether the optional drop shadows for `PopupMenus` are enabled or disabled. If the user has set a system property, we log a message about the choosen style.

  This property just set the feature's enablement, not its actual activation. For example, drop shadows are always inactive on the Mac OS X, because this platform already provides shadows. The activation is requested in `#isPopupDropShadowActive`.

  Returns:
    true if drop shadows are enabled, false if disabled
  See Also:
    `isPopupDropShadowActive()`, `setPopupDropShadowEnabled(boolean)`

### setPopupDropShadowEnabled

    public static void setPopupDropShadowEnabled(boolean b)

  Enables or disables drop shadows in `PopupMenu`s. Note that drop shadows are always inactive on the Mac OS X.

  It is recommended to enable this feature only on platforms that accelerate translucency and snapshots with the hardware.

  Note: The current implementation fails to paint heavy-weight popup drop-shadows under some conditions. Before you enable drop shadows, you should make sure that your application won't get into these problems. Heavy weight popups fail if you display cascaded popups or pull-down menus. If you are using cascaded menus and the application won't be executed in full-screen mode, users may experience paint glitches.

  Parameters:
    `b` - true to enable drop shadows, false to disable them
  See Also:
    `isPopupDropShadowActive()`, `isPopupDropShadowEnabled()`

### putLookAndFeelReplacement

    public static void putLookAndFeelReplacement(String original,
                                                 String replacement)

  Puts a replacement name for a given `LookAndFeel` class name in the list of all look and feel replacements.

  Parameters:
    `original` - the name of the look-and-feel to replace
    `replacement` - the name of the replacement look-and-feel
  See Also:
    `removeLookAndFeelReplacement(String)`, `getReplacementClassNameFor(String)`

### removeLookAndFeelReplacement

    public static void removeLookAndFeelReplacement(String original)

  Removes a replacement name for a given `LookAndFeel` class name from the list of all look and feel replacements.

  Parameters:
    `original` - the name of the look-and-feel that has been replaced
  See Also:
    `putLookAndFeelReplacement(String, String)`, `getReplacementClassNameFor(String)`

### initializeDefaultReplacements

    public static void initializeDefaultReplacements()

  Initializes some default class name replacements, that replace Sun's Java look and feel, and Sun's Windows look and feel by the appropriate JGoodies replacements.

  See Also:
    `putLookAndFeelReplacement(String, String)`, `removeLookAndFeelReplacement(String)`, `getReplacementClassNameFor(String)`

### getReplacementClassNameFor

    public static String getReplacementClassNameFor(String className)

  Returns the class name that can be used to replace the specified `LookAndFeel` class name.

  Parameters:
    `className` - the name of the look-and-feel class
  Returns:
    the name of the suggested replacement class
  See Also:
    `putLookAndFeelReplacement(String, String)`, `removeLookAndFeelReplacement(String)`, `initializeDefaultReplacements()`

### getCrossPlatformLookAndFeelClassName

    public static String getCrossPlatformLookAndFeelClassName()

  Returns the class name for a cross-platform `LookAndFeel`.

  Returns:
    the name of a cross platform look-and-feel class
  See Also:
    `getSystemLookAndFeelClassName()`

### getSystemLookAndFeelClassName

    public static String getSystemLookAndFeelClassName()

  Returns the class name for a system specific `LookAndFeel`.

  Returns:
    the name of the system look-and-feel class
  See Also:
    `getCrossPlatformLookAndFeelClassName()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2004 JGoodies Karsten Lentzsch. All Rights Reserved.