|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcontrib.com.jgoodies.looks.Options
public final class Options
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.
Field Summary | |
---|---|
static java.lang.String |
CONTROL_FONT_KEY
|
static java.lang.String |
DEFAULT_ICON_SIZE_KEY
|
static java.lang.String |
DEFAULT_LOOK_NAME
|
static java.lang.String |
EMBEDDED_TABS_KEY
A client property key for JTabbedPanes that indicates that tabs are painted with a special embedded appearance. |
static java.lang.String |
EXT_WINDOWS_NAME
Deprecated. Replaced by JGOODIES_WINDOWS_NAME . |
static java.lang.String |
FONT_SIZE_HINTS_KEY
|
static java.lang.String |
HEADER_STYLE_KEY
Hint for the style: Single or Both, see HeaderStyle . |
static java.lang.String |
IS_ETCHED_KEY
Hint that the scroll pane border should be etched. |
static java.lang.String |
IS_NARROW_KEY
Hint that the button margin should be narrow. |
static java.lang.String |
JGOODIES_WINDOWS_NAME
|
static java.lang.String |
MENU_FONT_KEY
|
static java.lang.String |
NO_CONTENT_BORDER_KEY
A client property key for JTabbedPanes that indicates that no content border shall be painted. |
static java.lang.String |
NO_ICONS_KEY
Hint that the menu items in the menu have no icons. |
static java.lang.String |
PLASTIC_NAME
|
static java.lang.String |
PLASTIC3D_NAME
|
static java.lang.String |
PLASTICXP_NAME
|
static java.lang.String |
POPUP_DROP_SHADOW_ENABLED_KEY
|
static java.lang.String |
TAB_ICONS_ENABLED_KEY
|
static java.lang.String |
TREE_LINE_STYLE_ANGLED_VALUE
A client property value for JTrees that indicates that lines shall be drawn. |
static java.lang.String |
TREE_LINE_STYLE_KEY
A client property key for JTrees. |
static java.lang.String |
TREE_LINE_STYLE_NONE_VALUE
A client property value for JTrees that indicates that lines shall be hidden. |
static java.lang.String |
USE_NARROW_BUTTONS_KEY
|
static java.lang.String |
USE_SYSTEM_FONTS_APP_KEY
|
static java.lang.String |
USE_SYSTEM_FONTS_KEY
|
Method Summary | |
---|---|
static java.lang.String |
getCrossPlatformLookAndFeelClassName()
Returns the class name for a cross-platform LookAndFeel . |
static java.awt.Dimension |
getDefaultIconSize()
Returns the default icon size that is used in menus, menu items and toolbars. |
static FontSizeHints |
getGlobalFontSizeHints()
Returns the global FontSizeHints
that can be overriden by a look-specific setting. |
static java.lang.String |
getReplacementClassNameFor(java.lang.String className)
Returns the class name that can be used to replace the specified LookAndFeel class name. |
static java.lang.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()
Checks and answers if we shall use icons in JTabbedPanes. |
static void |
putLookAndFeelReplacement(java.lang.String original,
java.lang.String replacement)
Puts a replacement name for a given LookAndFeel
class name in the list of all look and feel replacements. |
static void |
removeLookAndFeelReplacement(java.lang.String original)
Removes a replacement name for a given LookAndFeel
class name from the list of all look and feel replacements. |
static void |
setDefaultIconSize(java.awt.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 PopupMenus. |
static void |
setTabIconsEnabled(boolean b)
Enables or disables the use of icons in JTabbedPanes. |
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 |
---|
public static final java.lang.String PLASTIC_NAME
public static final java.lang.String PLASTIC3D_NAME
public static final java.lang.String PLASTICXP_NAME
public static final java.lang.String JGOODIES_WINDOWS_NAME
public static final java.lang.String EXT_WINDOWS_NAME
JGOODIES_WINDOWS_NAME
.
public static final java.lang.String DEFAULT_LOOK_NAME
public static final java.lang.String MENU_FONT_KEY
public static final java.lang.String CONTROL_FONT_KEY
public static final java.lang.String FONT_SIZE_HINTS_KEY
public static final java.lang.String USE_SYSTEM_FONTS_KEY
public static final java.lang.String USE_SYSTEM_FONTS_APP_KEY
public static final java.lang.String DEFAULT_ICON_SIZE_KEY
public static final java.lang.String USE_NARROW_BUTTONS_KEY
public static final java.lang.String TAB_ICONS_ENABLED_KEY
public static final java.lang.String POPUP_DROP_SHADOW_ENABLED_KEY
public static final java.lang.String IS_NARROW_KEY
public static final java.lang.String IS_ETCHED_KEY
public static final java.lang.String HEADER_STYLE_KEY
HeaderStyle
.
public static final java.lang.String NO_ICONS_KEY
public static final java.lang.String TREE_LINE_STYLE_KEY
public static final java.lang.String TREE_LINE_STYLE_ANGLED_VALUE
public static final java.lang.String TREE_LINE_STYLE_NONE_VALUE
public static final java.lang.String NO_CONTENT_BORDER_KEY
public static final java.lang.String EMBEDDED_TABS_KEY
Method Detail |
---|
public static boolean getUseSystemFonts()
setUseSystemFonts(boolean)
public static void setUseSystemFonts(boolean useSystemFonts)
useSystemFonts
- true to enable system fonts in the UIManagergetUseSystemFonts()
public static java.awt.Dimension getDefaultIconSize()
setDefaultIconSize(Dimension)
public static void setDefaultIconSize(java.awt.Dimension defaultIconSize)
defaultIconSize
- the default icon size to setgetDefaultIconSize()
public static FontSizeHints getGlobalFontSizeHints()
FontSizeHints
that can be overriden by a look-specific setting.
setGlobalFontSizeHints(FontSizeHints)
public static void setGlobalFontSizeHints(FontSizeHints hints)
FontSizeHints
.
hints
- the FontSizeHints object to be used globallygetGlobalFontSizeHints()
public static boolean getUseNarrowButtons()
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.
setUseNarrowButtons(boolean)
public static void setUseNarrowButtons(boolean b)
b
- true to use narrow button margins globallygetUseNarrowButtons()
public 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()
Currently only the Mac OS X is detected as platform where the toolkit uses native drop shadows.
isPopupDropShadowEnabled()
,
setPopupDropShadowEnabled(boolean)
public static boolean isPopupDropShadowEnabled()
isPopupDropShadowActive()
,
setPopupDropShadowEnabled(boolean)
public static void setPopupDropShadowEnabled(boolean b)
It is recommended to enable this feature only on platforms that accelerate translucency and snapshots with the hardware.
b
- true to enable drop shadows, false to disable themisPopupDropShadowActive()
,
isPopupDropShadowEnabled()
public static void putLookAndFeelReplacement(java.lang.String original, java.lang.String replacement)
LookAndFeel
class name in the list of all look and feel replacements.
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(java.lang.String original)
LookAndFeel
class name from the list of all look and feel replacements.
original
- the name of the look-and-feel that has been replacedputLookAndFeelReplacement(String, String)
,
getReplacementClassNameFor(String)
public static void initializeDefaultReplacements()
putLookAndFeelReplacement(String, String)
,
removeLookAndFeelReplacement(String)
,
getReplacementClassNameFor(String)
public static java.lang.String getReplacementClassNameFor(java.lang.String className)
LookAndFeel
class name.
className
- the name of the look-and-feel class
putLookAndFeelReplacement(String, String)
,
removeLookAndFeelReplacement(String)
,
initializeDefaultReplacements()
public static java.lang.String getCrossPlatformLookAndFeelClassName()
LookAndFeel
.
getSystemLookAndFeelClassName()
public static java.lang.String getSystemLookAndFeelClassName()
LookAndFeel
.
getCrossPlatformLookAndFeelClassName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |