|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jgoodies.looks.Options
public final class Options
Provides access to optional features of the JGoodies L&F
via a key to the system properties, via a key for the UIDefaults
| Field Summary | |
|---|---|
static String |
COMBO_POPUP_PROTOTYPE_DISPLAY_VALUE_KEY
A JComboBox client property key for the combo' popup menu prototype display value. |
static String |
COMBO_RENDERER_IS_BORDER_REMOVABLE
A client property key for combo box renderer components. |
static String |
DEFAULT_ICON_SIZE_KEY
|
static String |
DEFAULT_LOOK_NAME
The class name of the default JGoodies L&f, PlasticXP. |
static String |
EMBEDDED_TABS_KEY
A JTabbedPane client property key that indicate that tabs are painted with a special embedded appearance. |
static String |
HEADER_STYLE_KEY
A client property key for JMenuBar and JToolBar style hints. |
static String |
HI_RES_DISABLED_ICON_CLIENT_KEY
A client property key for components with a disabled ico such as buttons, labels, and tabbed panes. |
static String |
HI_RES_GRAY_FILTER_ENABLED_KEY
A UIDefaults key for enabling/disabling the new high-resolutio gray filter globally. |
static String |
INVERT_SELECTION_CLIENT_KEY
A JTextField client property key that specifies the directio how text shall be selected on focus gain - if at all from start to end vs. end to start. |
static String |
IS_ETCHED_KEY
A JScrollPane client property key for a hin that the scroll pane border should be etched. |
static String |
JGOODIES_WINDOWS_NAME
The class name of the JGoodies Windows L&f. |
static String |
NO_CONTENT_BORDER_KEY
A JTabbedPane client property key that indicate that no content border shall be painted. |
static String |
NO_ICONS_KEY
A JMenu client property key for a hin that the menu items in the menu have no icons. |
static String |
NO_MARGIN_KEY
A JPopupMenu client property key for a hint that the borde shall have no extra margin. |
static String |
NO_REPLACEMENT
A replacement used to replace a given L&f with nothing that indicates that it should not be used. |
static String |
PLASTIC_CONTROL_FONT_KEY
A key for setting the default control font in Plastic L&fs. |
static String |
PLASTIC_FONT_POLICY_KEY
A key for setting a custom FontPolicy for the Plastic L&fs. |
static String |
PLASTIC_MENU_FONT_KEY
A key for setting the default menu font in Plastic L&fs. |
static String |
PLASTIC_MICRO_LAYOUT_POLICY_KEY
A UIManager key for setting a custom MicroLayoutPolic for the Plastic L&fs. |
static String |
PLASTIC_NAME
The class name of the JGoodies Plastic L&f. |
static String |
PLASTIC3D_NAME
The class name of the JGoodies Plastic3D L&f. |
static String |
PLASTICXP_NAME
The class name of the JGoodies PlasticXP L&f. |
static String |
POPUP_DROP_SHADOW_ENABLED_KEY
A UIDefaults key for the popup drop shadow enablement. |
static String |
SELECT_ON_FOCUS_GAIN_CLIENT_KEY
A JTextField client property key that specifies whether all text shal be selected on focus gain. |
static String |
SELECT_ON_FOCUS_GAIN_KEY
A UIDefaults key for the global default whether text field shall select all text on focus gain. |
static String |
SET_CARET_TO_START_ON_FOCUS_LOST_CLIENT_KEY
A JTextField client property key that specifies whether the care shall be positioned at the start on focus lost. |
static String |
TAB_ICONS_ENABLED_KEY
|
static String |
TREE_LINE_STYLE_ANGLED_VALUE
A JTree client property value that indicates that lines shall be drawn. |
static String |
TREE_LINE_STYLE_KEY
A JTree client property key for a tree line style hint. |
static String |
TREE_LINE_STYLE_NONE_VALUE
A JTree client property value that indicates that lines shall be hidden. |
static String |
USE_NARROW_BUTTONS_KEY
|
static String |
USE_SYSTEM_FONTS_APP_KEY
A convenience constant for the standard Swing UIDefaults ke that configures the use of system fonts. |
static String |
USE_SYSTEM_FONTS_KEY
A convenience constant for the standard Swing system property ke that configures the use of system fonts. |
static String |
WINDOWS_CONTROL_FONT_KEY
A key for setting the default control font in the Windows L&f. |
static String |
WINDOWS_FONT_POLICY_KEY
A key for setting a custom FontPolicy for the Windows L&fs. |
static String |
WINDOWS_MENU_FONT_KEY
A key for setting the default menu font in the Windows L&f. |
static String |
WINDOWS_MICRO_LAYOUT_POLICY_KEY
A UIManager key for setting a custom MicroLayoutPolic for the Windows L&f. |
| 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 an toolbars. |
static String |
getReplacementClassNameFor(String className)
Returns the class name that can be used to replace the specifie LookAndFeel class name. |
static Boolean |
getSelectOnFocusGainEnabled(JTextComponent c)
Returns component's individual setting for the select on focus gai feature. |
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 native system fonts shall be used, true
|
static boolean |
isHiResGrayFilterEnabled()
Checks and answers whether the new high-resolution gray filte is enabled or disabled. |
static boolean |
isPopupDropShadowActive()
Checks and answers whether popup drop shadows are active. |
static boolean |
isPopupDropShadowEnabled()
Checks and answers whether the optional drop shadows fo PopupMenus are enabled or disabled. |
static boolean |
isSelectOnFocusGainActive(JTextComponent c)
Checks and answers whether the select all on focus gain featur is active for the given field. |
static boolean |
isSelectOnFocusGainEnabled()
Checks and answers whether the global default for text field is to select all text on focus gain. |
static boolean |
isTabIconsEnabled()
Checks and answers if we shall use icons in JTabbedPanes. |
static void |
putLookAndFeelReplacement(String original,
String replacement)
Puts a replacement name for a given LookAndFeel
|
static void |
removeLookAndFeelReplacement(String original)
Removes a replacement name for a given LookAndFeel
|
static void |
setDefaultIconSize(Dimension defaultIconSize)
Sets the default icon size. |
static void |
setHiResGrayFilterEnabled(boolean b)
Enables or disables the new high-resolution gray filter globally. |
static void |
setPopupDropShadowEnabled(boolean b)
Enables or disables drop shadows in PopupMenus. |
static void |
setSelectOnFocusGainEnabled(boolean b)
Enables or disables the select on focus gain feature globally. |
static void |
setSelectOnFocusGainEnabled(JTextField field,
Boolean b)
Overrides the global default for the select all feature for the give text field. |
static void |
setTabIconsEnabled(boolean b)
Enables or disables the use of icons in JTabbedPanes. |
static void |
setUseNarrowButtons(boolean b)
Globally sets the 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 |
|---|
public static final String PLASTIC_NAME
public static final String PLASTIC3D_NAME
public static final String PLASTICXP_NAME
public static final String JGOODIES_WINDOWS_NAME
public static final String DEFAULT_LOOK_NAME
public static final String PLASTIC_FONT_POLICY_KEY
PlasticLookAndFeel.getFontPolicy(),
PlasticLookAndFeel.setFontPolicy(FontPolicy),
Constant Field Valuespublic static final String PLASTIC_CONTROL_FONT_KEY
FontPolicies.customSettingsPolicy(FontPolicy),
Constant Field Valuespublic static final String PLASTIC_MENU_FONT_KEY
FontPolicies.customSettingsPolicy(FontPolicy),
Constant Field Valuespublic static final String WINDOWS_FONT_POLICY_KEY
WindowsLookAndFeel.getFontPolicy(),
WindowsLookAndFeel.setFontPolicy(FontPolicy),
Constant Field Valuespublic static final String WINDOWS_CONTROL_FONT_KEY
FontPolicies.customSettingsPolicy(FontPolicy),
Constant Field Valuespublic static final String WINDOWS_MENU_FONT_KEY
FontPolicies.customSettingsPolicy(FontPolicy),
Constant Field Valuespublic static final String USE_SYSTEM_FONTS_KEY
getUseSystemFonts(),
setUseSystemFonts(boolean),
Constant Field Valuespublic static final String USE_SYSTEM_FONTS_APP_KEY
getUseSystemFonts(),
setUseSystemFonts(boolean),
Constant Field Valuespublic static final String PLASTIC_MICRO_LAYOUT_POLICY_KEY
PlasticLookAndFeel.getMicroLayoutPolicy(),
PlasticLookAndFeel.setMicroLayoutPolicy(MicroLayout),
Constant Field Valuespublic static final String WINDOWS_MICRO_LAYOUT_POLICY_KEY
WindowsLookAndFeel.getMicroLayoutPolicy(),
WindowsLookAndFeel.setMicroLayoutPolicy(MicroLayout),
Constant Field Valuespublic static final String DEFAULT_ICON_SIZE_KEY
public static final String USE_NARROW_BUTTONS_KEY
public static final String TAB_ICONS_ENABLED_KEY
public static final String POPUP_DROP_SHADOW_ENABLED_KEY
isPopupDropShadowEnabled(),
setPopupDropShadowEnabled(boolean),
Constant Field Valuespublic static final String HI_RES_GRAY_FILTER_ENABLED_KEY
setHiResGrayFilterEnabled(boolean),
HI_RES_DISABLED_ICON_CLIENT_KEY,
Constant Field Valuespublic static final String SELECT_ON_FOCUS_GAIN_KEY
setSelectOnFocusGainEnabled(boolean),
Constant Field Valuespublic static final String IS_ETCHED_KEY
public static final String HEADER_STYLE_KEY
HeaderStyle.Single an
HeaderStyle.Both.
HeaderStyle,
BorderStyle,
Constant Field Valuespublic static final String NO_ICONS_KEY
public static final String NO_MARGIN_KEY
public static final String TREE_LINE_STYLE_KEY
TREE_LINE_STYLE_ANGLED_VALUE,
TREE_LINE_STYLE_NONE_VALUE,
Constant Field Valuespublic static final String TREE_LINE_STYLE_ANGLED_VALUE
TREE_LINE_STYLE_KEY,
Constant Field Valuespublic static final String TREE_LINE_STYLE_NONE_VALUE
TREE_LINE_STYLE_KEY,
Constant Field Valuespublic static final String NO_CONTENT_BORDER_KEY
public static final String EMBEDDED_TABS_KEY
public static final String COMBO_POPUP_PROTOTYPE_DISPLAY_VALUE_KEY
public static final String COMBO_RENDERER_IS_BORDER_REMOVABLE
WindowsComboBoxUI#paintCurrentValue}.
public static final String HI_RES_DISABLED_ICON_CLIENT_KEY
isHiResGrayFilterEnabled(),
setHiResGrayFilterEnabled(boolean),
HI_RES_GRAY_FILTER_ENABLED_KEY,
Constant Field Valuespublic static final String SELECT_ON_FOCUS_GAIN_CLIENT_KEY
setSelectOnFocusGainEnabled(JTextField, Boolean)
If you want to avoid to link application code to the JGoodies Look
library, you can set the client property directly using
setSelectOnFocusGainEnabled(boolean),
Constant Field Valuespublic static final String INVERT_SELECTION_CLIENT_KEY
public static final String SET_CARET_TO_START_ON_FOCUS_LOST_CLIENT_KEY
public static final String NO_REPLACEMENT
| Method Detail |
|---|
public static boolean getUseSystemFonts()
true
setUseSystemFonts(boolean),
USE_SYSTEM_FONTS_KEY,
USE_SYSTEM_FONTS_APP_KEYpublic static void setUseSystemFonts(boolean useSystemFonts)
useSystemFonts - true to enable system fonts in the UIManagergetUseSystemFonts(),
USE_SYSTEM_FONTS_KEY,
USE_SYSTEM_FONTS_APP_KEYpublic static Dimension getDefaultIconSize()
setDefaultIconSize(Dimension)public static void setDefaultIconSize(Dimension defaultIconSize)
defaultIconSize - the default icon size to setgetDefaultIconSize()public static boolean getUseNarrowButtons()
trueNote: Using narrow button margins can potentially caus
compatibility issues, if you don't take care that command buttons wit
short labels (OK) get a reasonable minimum width. Therefore you ca
get back to wide button margins using #setUseNarrowButtons
Sun's L&F implementations use a wider button margin of 14 pixels.
true (default) if all buttons shall use narro
margins, false for wider marginssetUseNarrowButtons(boolean),
USE_NARROW_BUTTONS_KEYpublic static void setUseNarrowButtons(boolean b)
b - true to use narrow button margins globallygetUseNarrowButtons(),
USE_NARROW_BUTTONS_KEYpublic static boolean isTabIconsEnabled()
setTabIconsEnabled(boolean)public static void setTabIconsEnabled(boolean b)
b - true to enable icons in tabbed panes, false to disable themisTabIconsEnabled()public static boolean isPopupDropShadowActive()
isPopupDropShadowEnabled(),
setPopupDropShadowEnabled(boolean)public static boolean isPopupDropShadowEnabled()
isPopupDropShadowActive(),
setPopupDropShadowEnabled(boolean),
POPUP_DROP_SHADOW_ENABLED_KEYpublic static void setPopupDropShadowEnabled(boolean b)
b - true to enable drop shadows, false to disable themisPopupDropShadowActive(),
isPopupDropShadowEnabled()public static boolean isHiResGrayFilterEnabled()
setHiResGrayFilterEnabled(boolean),
HI_RES_GRAY_FILTER_ENABLED_KEY,
HI_RES_DISABLED_ICON_CLIENT_KEYpublic static void setHiResGrayFilterEnabled(boolean b)
HI_RES_DISABLED_ICON_CLIENT_KEY.
b - true to enable the high-resolution gray filter
false to disable themisHiResGrayFilterEnabled()public static boolean isSelectOnFocusGainEnabled()
setSelectOnFocusGainEnabled(boolean).
SELECT_ON_FOCUS_GAIN_KEY,
SELECT_ON_FOCUS_GAIN_CLIENT_KEYpublic static void setSelectOnFocusGainEnabled(boolean b)
SELECT_ALL_ON_FOCUS_GAIN_CLIENT_KEY
It is enabled by default.Background: If users are more likely going to reenter the entir value in a text field, all text shall be selected on focus gain If users are more likely to edit a text, the caret shall be place at the end of the text.
b - true to enable the select all on focus gain
false to disable this feature globallyisSelectOnFocusGainEnabled()public static boolean isSelectOnFocusGainActive(JTextComponent c)
c - the component to check
c or globally
false if the feature is disabled for c or globall
disabled.public static Boolean getSelectOnFocusGainEnabled(JTextComponent c)
c - the component to check
isSelectOnFocusGainActive(JTextComponent)
public static void setSelectOnFocusGainEnabled(JTextField field,
Boolean b)
field - the field to set this featureb - Boolean.TRUE to enable, Boolean.FALSE to disable
null to use the global default
public static void putLookAndFeelReplacement(String original,
String replacement)
LookAndFeel
original - the name of the look-and-feel to replacereplacement - the name of the replacement look-and-feelremoveLookAndFeelReplacement(String),
getReplacementClassNameFor(String)public static void removeLookAndFeelReplacement(String original)
LookAndFeel
original - the name of the look-and-feel that has been replacedputLookAndFeelReplacement(String, String),
getReplacementClassNameFor(String)public static String getReplacementClassNameFor(String className)
LookAndFeel class name.
className - the name of the look-and-feel class
putLookAndFeelReplacement(String, String),
removeLookAndFeelReplacement(String)public static String getCrossPlatformLookAndFeelClassName()
LookAndFeel.
getSystemLookAndFeelClassName()public static String getSystemLookAndFeelClassName()
LookAndFeel.
getCrossPlatformLookAndFeelClassName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||