|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.LookAndFeel
javax.swing.plaf.basic.BasicLookAndFeel
org.jvnet.substance.SubstanceLookAndFeel
public class SubstanceLookAndFeel
Main class for Substance look and feel. All static methods in
this class should be called when Substance is the currently set look and
feel.
Since version 3.1, Substance no longer extends Metal. As before, this
is an implementation detail and not part of an official API.
Field Summary | |
---|---|
static java.lang.String |
BACKGROUND_COMPOSITE
Client property name for specifying the background composite for various translucency effects. |
protected static java.util.Map<java.lang.Class<?>,ControlBackgroundComposite> |
backgroundComposites
Contains default background composites on per-class basis. |
static org.jvnet.lafwidget.animation.FadeKind |
BORDER_ANIMATION_KIND
Fade kind for border animations. |
static java.lang.String |
BORDER_PAINTER_PROPERTY
Property name for specifying border painter. |
protected static java.util.Set<BorderPainterChangeListener> |
borderPainterChangeListeners
List of all listeners on border painter changes. |
protected static org.jvnet.lafplugin.PluginManager |
borderPainterPlugins
Plugin manager for border painter plugins. |
static java.lang.String |
BUTTON_NO_MIN_SIZE_PROPERTY
Client property name for ignoring default (minimum) dimension for a single button. |
static java.lang.String |
BUTTON_OPEN_SIDE_PROPERTY
Client property name for specifying an open side for a single button. |
static java.lang.String |
BUTTON_PAINT_NEVER_PROPERTY
Client property name for specifying that a single button / all application buttons should never paint the background. |
static java.lang.String |
BUTTON_SHAPER_PROPERTY
Property name for specifying button shaper. |
static java.lang.String |
BUTTON_SIDE_PROPERTY
Client property name for specifying a straight side for a single button. |
protected static java.util.Set<ButtonShaperChangeListener> |
buttonShaperChangeListeners
List of all listeners on button shaper changes. |
static java.lang.String |
COMBO_BOX_POPUP_FLYOUT_ORIENTATION
Client property name for specifying combo popup flyout orientation. |
static java.lang.String |
COMBO_POPUP_PROTOTYPE
Property name for specifying the combobox popup prototype display value which is used to compute the width of the popup at runtime. |
protected static org.jvnet.lafplugin.ComponentPluginManager |
componentPlugins
Plugin manager for component plugins. |
static java.lang.String |
CONFIG_FILE
VM property name for the configuration file. |
static java.lang.String |
CORNER_RADIUS
Client property name for specifying the corner radius for buttons. |
protected java.awt.KeyboardFocusManager |
currentKeyboardFocusManager
The current keyboard focus manager - fix for defect 208. |
static java.lang.String |
DEBUG_UI_MODE
Property name for specifying the debug UI mode. |
static java.lang.String |
ENABLE_INVERTED_THEMES
Property name for enabling inverted themes. |
static java.lang.String |
ENABLE_NEGATED_THEMES
Property name for enabling negated themes. |
static java.lang.String |
FLAT_PROPERTY
Property name for specifying that the component should be painted flat (no background / border) when it's inactive. |
static java.lang.String |
FOCUS_KIND
Client property name for specifying the kind of focus indication on buttons, check boxes and radio buttons. |
protected java.beans.PropertyChangeListener |
focusOwnerChangeListener
Change listener on keyboard focus manager - fix for defect 208. |
static java.lang.String |
GRADIENT_PAINTER_PROPERTY
Property name for specifying gradient painter. |
protected static java.util.Set<GradientPainterChangeListener> |
gradientPainterChangeListeners
List of all listeners on gradient painter changes. |
static java.lang.String |
GRIP_PAINTER
Property name for specifying custom grip handles. |
static java.lang.String |
HEAP_STATUS_PANEL
Property name for specifying that custom frame title panes should show the heap status panel. |
protected static java.util.Set<java.lang.String> |
ignoreAnimationsSet
Contains a list of all control class names that should ignore the animations. |
protected static boolean |
isDebugUiMode
Indicates whether the application will be run in debug UI mode |
protected static java.util.Set<LocaleChangeListener> |
localeChangeListeners
List of all listeners on closing tabs. |
static java.lang.String |
MENU_GUTTER_FILL_KIND
Property name for specifying menu gutter fill kind. |
protected static java.util.Map<java.lang.String,SubstanceMixTheme> |
mixedThemes
List of all globally registered mixed themes. |
static java.lang.String |
NO_EXTRA_ELEMENTS
Property name for specifying that no extra UI elements (such as menu items in system menu or menu search panel) should be shown. |
static java.lang.String |
OVERLAY_PROPERTY
Client property name for specifying that a single control / all application controls have overlay functionality. |
static java.lang.String |
PAINT_ACTIVE_PROPERTY
Client property name for specifying that a single control / all application controls should always be painted in active color (unless a control is disabled). |
protected static org.jvnet.lafplugin.PluginManager |
painterPlugins
Plugin manager for gradient painter plugins. |
protected static ParamReader |
paramReader
The parameter reader. |
static java.lang.String |
PASSWORD_ECHO_PER_CHAR
Client property name for specifying the number of echo characters for each password character. |
static java.lang.String |
PLUGIN_XML
The name of plugin configuration XML resource name. |
static java.lang.String |
SCROLL_PANE_BUTTONS_POLICY
Client property name for specifying scroll pane button policy. |
protected static org.jvnet.lafplugin.PluginManager |
shaperPlugins
Plugin manager for button shaper plugins. |
protected static java.util.Set<SkinChangeListener> |
skinChangeListeners
List of all listeners on skin changes. |
protected static org.jvnet.lafplugin.PluginManager |
skinPlugins
Plugin manager for skin plugins. |
protected static java.lang.String |
SUBSTANCE_FONT_POLICY_KEY
Internal client property name for storing application-specific font policy. |
static java.lang.String |
TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION
Client property name for specifying that only the close button of a marked-as-modified tab component should pulsate. |
static java.lang.String |
TABBED_PANE_CLOSE_BUTTONS_PROPERTY
Client property name for specifying that a single tab / all tabs of a single tabbed pane / all tabs of all tabbed panes should have close buttons. |
static java.lang.String |
TABBED_PANE_CLOSE_CALLBACK
Client property name for specifying the callback for deciding on the tab close type. |
static java.lang.String |
TABBED_PANE_CONTENT_BORDER_KIND
Client property name for specifying the content pane border kind. |
static java.lang.String |
TABBED_PANE_TEXT_ALIGNMENT_KIND
Client property name for specifying the text alignment kind for on SwingConstants.LEFT and SwingConstants.RIGHT tab
placements. |
static java.lang.String |
TABBED_PANE_VERTICAL_ORIENTATION
Client property name for specifying that a single tabbed pane / all tabbed panes should have vertical layout (rotated tabs) on SwingConstants.LEFT and SwingConstants.RIGHT tab
placements. |
static java.lang.String |
TABBED_PANE_VERTICAL_ORIENTATION_ROTATE_ICONS
Client property name for specifying that when a single tabbed pane / all tabbed panes is layed-out vertically, the tab icons remain unrotated.This property can be specified on a single tab component, on a JTabbedPane itself (will hold for all tab components that don't
define this property) or on UIManager . |
static java.lang.String |
THEME_PROPERTY
Property name for setting theme. |
protected static java.util.Set<ThemeChangeListener> |
themeChangeListeners
List of all listeners on theme changes. |
protected static org.jvnet.lafplugin.PluginManager |
themePlugins
Plugin manager for theme plugins. |
static java.lang.String |
TITLE_PAINTER_PROPERTY
Property name for specifying title painter. |
protected static java.util.Set<TitlePainterChangeListener> |
titlePainterChangeListeners
List of all listeners on title painter changes. |
protected static org.jvnet.lafplugin.PluginManager |
titlePainterPlugins
Plugin manager for title painter plugins. |
protected static boolean |
toBleedWatermark
Indicates whether the watermark should "bleed" through lists, tables and trees. |
protected static boolean |
toEnableInvertedThemes
Indicates whether inverted themes should be enabled. |
protected static boolean |
toEnableNegatedThemes
Indicates whether inverted themes should be enabled. |
protected static boolean |
toShowExtraElements
Indicates whether extra UI elements (such as menu items in system menu or menu search panel) should be shown. |
protected static boolean |
toUseConstantThemesOnDialogs
Indicates whether option dialogs (error, question, warning, info) should use constant themes for icon coloring. |
static java.lang.String |
TRACE_FILE
VM property name for specifying the trace file. |
static org.jvnet.lafwidget.animation.FadeKind |
TREE_DECORATIONS_ANIMATION_KIND
Fade kind for tree decorations animation kind. |
static org.jvnet.lafwidget.animation.FadeKind |
TREE_SMART_SCROLL_ANIMATION_KIND
Fade kind for smart tree scroll. |
static java.lang.String |
USE_THEMED_DEFAULT_ICONS
Client property name for specifying that icons on buttons and toggle buttons should match the color of the current theme when they are in default state. |
static java.lang.String |
WATERMARK_IGNORE
Client property name for requesting that watermark should not be painted on the component and its descendants. |
static java.lang.String |
WATERMARK_IMAGE_KIND
VM property for specifying the image watermark kind. |
static java.lang.String |
WATERMARK_IMAGE_OPACITY
VM property for specifying the image watermark opacity. |
static java.lang.String |
WATERMARK_IMAGE_PROPERTY
Property name for setting SubstanceImageWatermark watermark
image. |
static java.lang.String |
WATERMARK_PROPERTY
Property name for setting watermark. |
static java.lang.String |
WATERMARK_TO_BLEED
Property name for requesting that watermark should bleed through lists, trees and tables. |
protected static java.util.Set<WatermarkChangeListener> |
watermarkChangeListeners
List of all listeners on watermark changes. |
protected static org.jvnet.lafplugin.PluginManager |
watermarkPlugins
Plugin manager for watermark plugins. |
static java.lang.String |
WINDOW_MODIFIED
Client property name for specifying that contents of some frame, dialog, internal frame, desktop icon or tab have been modified and not saved. |
Constructor Summary | |
---|---|
SubstanceLookAndFeel()
Creates new instance of Substance look and feel. |
Method Summary | |
---|---|
static void |
addMixedTheme(SubstanceMixTheme mixedTheme)
Globally registers a new mixed theme. |
static void |
addMixedTheme(SubstanceTheme... themes)
Globally registers a new mixed theme. |
static void |
addMixedThemeBy(SubstanceTheme mainTheme)
Globally registers a collection of mixed themes such as:
The specified theme is the main theme for a new mixed
theme.
The secondary theme is of the same kind.
|
static ColorScheme |
getActiveColorScheme()
Returns the current color scheme for components in active visual state. |
static java.util.Map<java.lang.String,BorderPainterInfo> |
getAllBorderPainters()
Returns all available border painters. |
static java.util.Map<java.lang.String,ButtonShaperInfo> |
getAllButtonShapers()
Returns all available button shapers. |
static java.util.Map<java.lang.String,GradientPainterInfo> |
getAllGradientPainters()
Returns all available gradient painters. |
static java.util.Map<java.lang.String,SkinInfo> |
getAllSkins()
Returns all available skins. |
static java.util.Set<BaseTabCloseListener> |
getAllTabCloseListeners()
Returns the set of all listeners registered on tab-close events on all tabbed panes. |
static java.util.Set<BaseTabCloseListener> |
getAllTabCloseListeners(javax.swing.JTabbedPane tabbedPane)
Returns all listeners registered on tab closing of the specified tabbed pane. |
static java.util.Map<java.lang.String,ThemeInfo> |
getAllThemes()
Returns all available themes. |
static java.util.Map<java.lang.String,TitlePainterInfo> |
getAllTitlePainters()
Returns all available title painters. |
static java.util.Map<java.lang.String,WatermarkInfo> |
getAllWatermarks()
Returns all available watermarks. |
static ControlBackgroundComposite |
getBackgroundComposite(java.awt.Component component)
Returns the default background composite for the specified component. |
static SubstanceBorderPainter |
getCurrentBorderPainter()
Returns the current Border painter. |
static java.lang.String |
getCurrentBorderPainterName()
Returns the current border painter name. |
static SubstanceButtonShaper |
getCurrentButtonShaper()
Returns the current button shaper. |
static java.lang.String |
getCurrentButtonShaperName()
Returns the current button shaper name. |
static SubstanceGradientPainter |
getCurrentGradientPainter()
Returns the current gradient painter. |
static java.lang.String |
getCurrentGradientPainterName()
Returns the current gradient painter name. |
static java.lang.String |
getCurrentThemeName()
Returns the current color theme name. |
static SubstanceTitlePainter |
getCurrentTitlePainter()
Returns the current title painter. |
static java.lang.String |
getCurrentTitlePainterName()
Returns the current title painter name. |
static SubstanceWatermark |
getCurrentWatermark()
Returns the current watermark. |
static java.lang.String |
getCurrentWatermarkName()
Returns the current watermark name. |
static ColorScheme |
getDefaultColorScheme()
Returns the current color scheme for components in default visual state. |
javax.swing.UIDefaults |
getDefaults()
|
java.lang.String |
getDescription()
|
static ColorScheme |
getDisabledColorScheme()
Returns the current color scheme for components in disabled visual state. |
static FontPolicy |
getFontPolicy()
Looks up and retrieves the FontPolicy used by the Substance
family. |
java.lang.String |
getID()
|
static SubstanceConstants.ImageWatermarkKind |
getImageWatermarkKind()
Returns the global kind for image-based watermarks. |
static float |
getImageWatermarkOpacity()
Returns the global opacity for image-based watermarks. |
static java.util.ResourceBundle |
getLabelBundle()
Retrieves the current label bundle. |
static java.util.ResourceBundle |
getLabelBundle(java.util.Locale locale)
Retrieves the label bundle for the specified locale. |
static java.util.Set<LocaleChangeListener> |
getLocaleListeners()
Returns all listeners registered on locale change. |
java.lang.String |
getName()
|
static ParamReader |
getParamReader()
Returns the parameter reader. |
static java.util.Set |
getPlugins()
Returns all available plugins. |
boolean |
getSupportsWindowDecorations()
|
static SubstanceTheme |
getTheme()
Returns the current theme. |
static javax.swing.JComponent |
getTitlePaneComponent(java.awt.Window window)
Returns the title pane of the specified top-level window. |
static boolean |
hasMixedThemes()
Checks whether there are any mixed themes registered
globally. |
static void |
hideMenuSearchPanels()
Hides menu search panels on all open frames. |
static void |
ignoreAnimationsOnClass(java.lang.Class<?> componentClazz)
Requests that animations be ignored on all instances of the specified class. |
static void |
ignoreAnimationsOnClass(java.lang.String componentClazzName)
Requests that animations be ignored on all instances of the specified class. |
protected void |
initClassDefaults(javax.swing.UIDefaults table)
|
protected void |
initComponentDefaults(javax.swing.UIDefaults table)
|
void |
initialize()
|
static boolean |
isDebugUiMode()
Returns indication whether the application is in debug UI mode. |
boolean |
isNativeLookAndFeel()
|
boolean |
isSupportedLookAndFeel()
|
static boolean |
isToUseConstantThemesOnDialogs()
Checks whether the JOptionPane s created with predefined
message types should use constant themes for the icons. |
static void |
permanentlyHideHeapStatusPanel(javax.swing.JRootPane pane)
Makes the heap status panels disappear permanently on the specified title pane and removes the corresponding check box menu items from the system menu. |
static void |
permanentlyShowHeapStatusPanel(javax.swing.JRootPane pane)
Makes the heap status panels appear permanently on the specified title pane and removes the corresponding check box menu items from the system menu. |
static void |
registerBorderPainterChangeListener(BorderPainterChangeListener borderPainterChangeListener)
Registers a new listener on border painter change. |
static void |
registerButtonShaperChangeListener(ButtonShaperChangeListener buttonShaperChangeListener)
Registers a new listener on button shaper change. |
static void |
registerGradientPainterChangeListener(GradientPainterChangeListener gradientPainterChangeListener)
Registers a new listener on gradient painter change. |
static void |
registerLocaleChangeListener(LocaleChangeListener localeListener)
Registers a new listener on locale change. |
static void |
registerSkinChangeListener(SkinChangeListener skinChangeListener)
Registers a new listener on skin change. |
static void |
registerTabCloseChangeListener(BaseTabCloseListener tabCloseListener)
Registers the specified listener on tab-close events on all tabbed panes. |
static void |
registerTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
BaseTabCloseListener tabCloseListener)
Registers the specified listener on tab-close events on the specified tabbed pane. |
static void |
registerThemeChangeListener(ThemeChangeListener themeChangeListener)
Registers a new listener on theme change. |
static void |
registerTitlePainterChangeListener(TitlePainterChangeListener titlePainterChangeListener)
Registers a new listener on title painter change. |
static void |
registerWatermarkChangeListener(WatermarkChangeListener watermarkChangeListener)
Registers a new listener on watermark change. |
static void |
removeMixedTheme(SubstanceMixTheme mixedTheme)
Globally unregisters the specified mixed theme. |
static void |
removeMixedThemeBy(SubstanceTheme mainTheme)
Globally unregisters a collection of mixed themes such
that the specified theme is the main theme. |
static void |
resetLabelBundle()
Resets the current label bundle. |
static void |
setBackgroundComposite(java.lang.Class<?> clazz,
ControlBackgroundComposite composite)
Specifies that a control of some class should use the specified background composite when it (the control) doesn't define the BACKGROUND_COMPOSITE client property. |
static boolean |
setCurrentBorderPainter(java.lang.String borderPainterClassName)
Sets new border painter. |
static boolean |
setCurrentBorderPainter(SubstanceBorderPainter currentBorderPainter)
Sets new border painter. |
static boolean |
setCurrentButtonShaper(java.lang.String buttonShaperClassName)
Sets new button shaper. |
static boolean |
setCurrentButtonShaper(SubstanceButtonShaper currentButtonShaper)
Sets new button shaper. |
static boolean |
setCurrentGradientPainter(java.lang.String gradientPainterClassName)
Sets new gradient painter. |
static boolean |
setCurrentGradientPainter(SubstanceGradientPainter currentGradientPainter)
Sets new gradient painter. |
static boolean |
setCurrentTheme(java.lang.String themeClassName)
Sets new theme. |
static boolean |
setCurrentTheme(SubstanceTheme theme)
Sets new theme. |
static boolean |
setCurrentTheme(ThemeInfo themeInfo)
Sets new theme. |
static boolean |
setCurrentTitlePainter(java.lang.String titlePainterClassName)
Sets new title painter. |
static boolean |
setCurrentTitlePainter(SubstanceTitlePainter currentTitlePainter)
Sets new title painter. |
static boolean |
setCurrentWatermark(java.lang.String watermarkClassName)
Sets new watermark. |
static boolean |
setCurrentWatermark(SubstanceWatermark currentWatermark)
Sets new watermark. |
static void |
setFontPolicy(FontPolicy fontPolicy)
Sets the FontPolicy to be used with Substance family. |
static void |
setImageWatermarkKind(SubstanceConstants.ImageWatermarkKind kind)
Sets the global kind for image-based watermarks. |
static void |
setImageWatermarkOpacity(float opacity)
Sets the global opacity for image-based watermarks. |
static void |
setLabelBundleClassLoader(java.lang.ClassLoader labelBundleClassLoader)
Sets the class loader for LABEL_BUNDLE . |
static boolean |
setSkin(java.lang.String skinClassName)
Sets the specified skin. |
static boolean |
setSkin(SubstanceSkin skin)
Sets the specified skin. |
static void |
setToUseConstantThemesOnDialogs(boolean toUseConstantThemesOnDialogs)
Sets the new setting for the icons of the JOptionPane s
created with predefined message types. |
static void |
showMenuSearchPanels()
Shows menu search panels on all open frames. |
static void |
stopThreads()
Stops all Substance threads. |
static boolean |
toBleedWatermark()
Returns indication whether the watermark should "bleed" through list, table and tree renderers (where possible). |
static boolean |
toEnableInvertedThemes()
Returns indication whether inverted themes should be enabled. |
static boolean |
toEnableNegatedThemes()
Returns indication whether negated themes should be enabled. |
static boolean |
toIgnoreAnimation(java.lang.Class<?> componentClazz)
Checks whether animations should be ignored on instances of the specified class. |
static boolean |
toShowExtraElements()
Returns indication whether extra UI elements (such as menu items in system menu or menu search panel) should be shown. |
void |
uninitialize()
|
static void |
unregisterBorderPainterChangeListener(BorderPainterChangeListener borderPainterChangeListener)
Unregisters a listener on border painter change. |
static void |
unregisterButtonShaperChangeListener(ButtonShaperChangeListener buttonShaperChangeListener)
Unregisters a listener on button shaper change. |
static void |
unregisterGradientPainterChangeListener(GradientPainterChangeListener gradientPainterChangeListener)
Unregisters a listener on gradient painter change. |
static void |
unregisterLocaleChangeListener(LocaleChangeListener localeListener)
Unregisters a listener on locale change. |
static void |
unregisterSkinChangeListener(SkinChangeListener skinChangeListener)
Unregisters a listener on skin change. |
static void |
unregisterTabCloseChangeListener(BaseTabCloseListener tabCloseListener)
Unregisters the specified listener on tab-close events on all tabbed panes. |
static void |
unregisterTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
BaseTabCloseListener tabCloseListener)
Unregisters the specified listener on tab-close events on the specified tabbed pane. |
static void |
unregisterThemeChangeListener(ThemeChangeListener themeChangeListener)
Unregisters a listener on theme change. |
static void |
unregisterTitlePainterChangeListener(TitlePainterChangeListener titlePainterChangeListener)
Unregisters a listener on title painter change. |
static void |
unregisterWatermarkChangeListener(WatermarkChangeListener watermarkChangeListener)
Unregisters a listener on watermark change. |
Methods inherited from class javax.swing.plaf.basic.BasicLookAndFeel |
---|
createAudioAction, getAudioActionMap, initSystemColorDefaults, loadSystemColors, playSound |
Methods inherited from class javax.swing.LookAndFeel |
---|
getDesktopPropertyValue, getDisabledIcon, getDisabledSelectedIcon, getLayoutStyle, installBorder, installColors, installColorsAndFont, installProperty, loadKeyBindings, makeComponentInputMap, makeIcon, makeInputMap, makeKeyBindings, provideErrorFeedback, toString, uninstallBorder |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PLUGIN_XML
protected static org.jvnet.lafplugin.ComponentPluginManager componentPlugins
protected static org.jvnet.lafplugin.PluginManager themePlugins
protected static org.jvnet.lafplugin.PluginManager skinPlugins
protected static org.jvnet.lafplugin.PluginManager watermarkPlugins
protected static org.jvnet.lafplugin.PluginManager shaperPlugins
protected static org.jvnet.lafplugin.PluginManager painterPlugins
protected static org.jvnet.lafplugin.PluginManager titlePainterPlugins
protected static org.jvnet.lafplugin.PluginManager borderPainterPlugins
protected static java.util.Set<SkinChangeListener> skinChangeListeners
protected static java.util.Set<ThemeChangeListener> themeChangeListeners
protected static java.util.Set<WatermarkChangeListener> watermarkChangeListeners
protected static java.util.Set<ButtonShaperChangeListener> buttonShaperChangeListeners
protected static java.util.Set<GradientPainterChangeListener> gradientPainterChangeListeners
protected static java.util.Set<TitlePainterChangeListener> titlePainterChangeListeners
protected static java.util.Set<BorderPainterChangeListener> borderPainterChangeListeners
protected static java.util.Set<LocaleChangeListener> localeChangeListeners
protected static java.util.Set<java.lang.String> ignoreAnimationsSet
protected static java.util.Map<java.lang.String,SubstanceMixTheme> mixedThemes
protected static java.util.Map<java.lang.Class<?>,ControlBackgroundComposite> backgroundComposites
BACKGROUND_COMPOSITE
property is set on the
control.
BACKGROUND_COMPOSITE
,
setBackgroundComposite(Class, ControlBackgroundComposite)
,
getBackgroundComposite(Component)
protected static boolean toShowExtraElements
toShowExtraElements()
,
NO_EXTRA_ELEMENTS
protected static boolean toUseConstantThemesOnDialogs
true
(use constant theme). To use
theme-consistent coloring, call
setToUseConstantThemesOnDialogs(boolean)
and pass
true
.
isToUseConstantThemesOnDialogs()
,
setToUseConstantThemesOnDialogs(boolean)
protected static boolean toEnableInvertedThemes
toEnableInvertedThemes()
,
ENABLE_INVERTED_THEMES
protected static boolean toEnableNegatedThemes
toEnableNegatedThemes()
,
ENABLE_NEGATED_THEMES
protected static boolean toBleedWatermark
toBleedWatermark()
,
WATERMARK_TO_BLEED
protected static boolean isDebugUiMode
isDebugUiMode()
,
DEBUG_UI_MODE
protected java.beans.PropertyChangeListener focusOwnerChangeListener
protected java.awt.KeyboardFocusManager currentKeyboardFocusManager
public static final org.jvnet.lafwidget.animation.FadeKind BORDER_ANIMATION_KIND
FadeConfigurationManager.disallowFades(FadeKind)
to disable.
public static final org.jvnet.lafwidget.animation.FadeKind TREE_DECORATIONS_ANIMATION_KIND
Fade kind for tree decorations animation kind. Disabled by default, use
FadeConfigurationManager.allowFades(FadeKind)
to enable.
Tree decorations include collapse / expand icons and vertical / horizontal lines.
public static final org.jvnet.lafwidget.animation.FadeKind TREE_SMART_SCROLL_ANIMATION_KIND
FadeConfigurationManager.allowFades(FadeKind)
to enable.
Smart tree scroll is relevant for scroll panes containing a tree. When enabled, it automatically scrolls the tree horizontally when the viewport shows mainly empty area (especially relevant for multi-level trees with narrow viewports).
public static final java.lang.String DEBUG_UI_MODE
UIManager
. In the
latter case, the value should be either Boolean.TRUE
or
Boolean.FALSE
.
Example of setting this property via VM flag:
-Dsubstancelaf.debugUiMode
Example of setting this property on UIManager
:
UIManager.put(SubstanceLookAndFeel.DEBUG_UI_MODE, Boolean.TRUE);
public static final java.lang.String THEME_PROPERTY
If this property is used as a JVM flag, the value should be a
fully-qualified name of the theme class. This class must have a default
(no-argument) constructor. This means that you can not specify "generic"
themes such as SubstanceMixTheme
or SubstanceToneTheme
.
If this property is used as a client property, the value can be one of:
String
- theme display name (only for primitive themes).ThemeInfo
object (call getAllThemes()
).SubstanceTheme
object itself.Example of specifying a custom default theme as a VM flag:
-Dsubstancelaf.theme=org.jvnet.substance.theme.SubstanceBottleGreenTheme
Example of using a theme display name as client property value:
JCheckBox cb = new JCheckBox("text");
cb.putClientProperty(SubstanceLookAndFeel.THEME_PROPERTY, "Bottle Green");
Example of using a ThemeInfo
object as client property value:
JCheckBox cb = new JCheckBox("text");
ThemeInfo ti = SubstanceLookAndFeel.getAllThemes().get("Bottle Green");
cb.putClientProperty(SubstanceLookAndFeel.THEME_PROPERTY, ti);
Example of using a SubstanceTheme
object as client property
value:
JCheckBox cb = new JCheckBox("text");
cb.putClientProperty(SubstanceLookAndFeel.THEME_PROPERTY,
new SubstanceBottleGreenTheme());
getCurrentThemeName()
,
getTheme()
,
setCurrentTheme(String)
,
setCurrentTheme(SubstanceTheme)
,
setCurrentTheme(ThemeInfo)
,
registerThemeChangeListener(ThemeChangeListener)
,
unregisterThemeChangeListener(ThemeChangeListener)
,
Constant Field Valuespublic static final java.lang.String WATERMARK_PROPERTY
SubstanceNoiseWatermark
.
Example of specifying a custom default watermark as a VM flag:
-Dsubstancelaf.watermark=org.jvnet.substance.watermark.SubstanceKatakanaWatermark
getCurrentWatermark()
,
getCurrentWatermarkName()
,
setCurrentWatermark(String)
,
setCurrentWatermark(SubstanceWatermark)
,
registerWatermarkChangeListener(WatermarkChangeListener)
,
unregisterWatermarkChangeListener(WatermarkChangeListener)
,
Constant Field Valuespublic static final java.lang.String WATERMARK_IMAGE_PROPERTY
SubstanceImageWatermark
watermark
image. This is only for JVM flag. The value should be a location of
watermark image as either filename or http-prefixed URL.
Example of specifying a local image as watermark image:
-Dsubstancelaf.watermark.image=C:/images/myimage.jpg
Example of specifying a URL image as watermark image:
-Dsubstancelaf.watermark.image=http://images.com/myimage.jpg
getImageWatermarkKind()
,
getImageWatermarkOpacity()
,
#setImageWatermarkKind(ImageWatermarkKind)
,
setImageWatermarkOpacity(float)
,
WATERMARK_IMAGE_KIND
,
WATERMARK_IMAGE_OPACITY
,
Constant Field Valuespublic static final java.lang.String WATERMARK_TO_BLEED
UIManager
(global setting).
When this property is used as a JVM flag, there is no need to specify any value:
-Dsubstancelaf.watermark.tobleed
When this property is set a client property on UIManager
, the
value should be one of Boolean.TRUE
or Boolean.FALSE
.
For example,
UIManager.put(SubstanceLookAndFeel.WATERMARK_TO_BLEED, Boolean.TRUE);
public static final java.lang.String WATERMARK_IGNORE
UIManager
. The value should be either Boolean.TRUE
or
Boolean.FALSE
.
In order to compute whether the current watermark should be painted on
some component, the component's hierarchy is traversed bottom up. The
first component that has this property set, defines the watermark
visibility. Finally, if neither component not its ancestors define this
property, the global setting on UIManager
is checked. If there is
no global setting, the watermark is not ignored (it is painted).
Here is an example to illustrate the above:
JPanel topPanel = new JPanel();
topPanel.putClientProperty(SubstanceLookAndFeel.WATERMARK_IGNORE,
Boolean.TRUE);
JPanel panel1 = new JPanel();
JPanel panel2 = new JPanel();
panel2.putClientProperty(SubstanceLookAndFeel.WATERMARK_IGNORE,
Boolean.FALSE);
JTextField tf1 = new JTextField("field1");
tf1.putClientProperty(SubstanceLookAndFeel.WATERMARK_IGNORE, Boolean.TRUE);
JTextField tf2 = new JTextField("field2");
panel1.add(tf1);
panel1.add(tf2);
topPanel.add(panel1);
topPanel.add(panel2);
In the code above, if UIManager
has no value for this property,
the watermark will be painted only on panel2 and tf1. The
panel1 and tf2 "inherit" the watermark-ignore setting
from their topPanel ancestor.
public static final java.lang.String WATERMARK_IMAGE_KIND
SubstanceConstants.ImageWatermarkKind
enum. Is used only as a JVM flag. The default value (if no VM flag is
specified) is
SubstanceConstants.ImageWatermarkKind#SCREEN_CENTER_SCALE
.
Example of specifying custom default image watermark kind:
-Dsubstancelaf.watermark.image.kind=APP_ANCHOR
getImageWatermarkKind()
,
getImageWatermarkOpacity()
,
#setImageWatermarkKind(ImageWatermarkKind)
,
setImageWatermarkOpacity(float)
,
WATERMARK_IMAGE_OPACITY
,
WATERMARK_IMAGE_PROPERTY
,
Constant Field Valuespublic static final java.lang.String WATERMARK_IMAGE_OPACITY
IllegalArgumentException
will be thrown at the application
startup. Example of setting custom default watermark image opacity: *
-Dsubstancelaf.watermark.image.opacity=0.6
getImageWatermarkKind()
,
getImageWatermarkOpacity()
,
#setImageWatermarkKind(ImageWatermarkKind)
,
setImageWatermarkOpacity(float)
,
WATERMARK_IMAGE_KIND
,
WATERMARK_IMAGE_PROPERTY
,
Constant Field Valuespublic static final java.lang.String BUTTON_NO_MIN_SIZE_PROPERTY
UIManager
. The value
should be either Boolean.TRUE
or Boolean.FALSE
.
Note that SubstanceButtonShaper
implementations are not required
to respect this property. The current implementations of the default
StandardButtonShaper
and ClassicButtonShaper
respect this
property.
Example of marking a button to ignore minimum dimension settings:
JButton button = new JButton("text");
button.putClientProperty(SubstanceLookAndFeel.BUTTON_NO_MIN_SIZE_PROPERTY,
Boolean.TRUE);
Example of marking all application buttons to ignore minimum dimension settings:
UIManager.put(SubstanceLookAndFeel.BUTTON_NO_MIN_SIZE_PROPERTY,
Boolean.TRUE);
public static final java.lang.String PAINT_ACTIVE_PROPERTY
UIManager
. The value should be either Boolean.TRUE
or
Boolean.FALSE
.
Example of marking a button to be painted active:
JButton button = new JButton("text");
button.putClientProperty(SubstanceLookAndFeel.PAINT_ACTIVE_PROPERTY,
Boolean.TRUE);
Example of marking all application controls to be painted active:
UIManager.put(SubstanceLookAndFeel.PAINT_ACTIVE_PROPERTY,
Boolean.TRUE);
public static final java.lang.String BUTTON_PAINT_NEVER_PROPERTY
UIManager
. The value should be either
Boolean.TRUE
or Boolean.FALSE
. Note that unlike the
FLAT_PROPERTY
, a button marked with this property will never
show the background (will always be painted flat).
Example of marking a button to never paint background:
JButton button = new JButton("text");
button.putClientProperty(SubstanceLookAndFeel.BUTTON_PAINT_NEVER_PROPERTY,
Boolean.TRUE);
Example of marking all application buttons to never paint background:
UIManager.put(SubstanceLookAndFeel.BUTTON_PAINT_NEVER_PROPERTY,
Boolean.TRUE);
FLAT_PROPERTY
,
Constant Field Valuespublic static final java.lang.String BUTTON_SIDE_PROPERTY
SubstanceConstants.Side
enum.
SubstanceConstants.Side
enum.
SubstanceConstants.Side
enum.
SubstanceConstants.Side
enum.
Note that not all SubstanceButtonShaper
implementations are
required to respect this property. The default
StandardButtonShaper
and ClassicButtonShaper
respect this
property.
Example of marking a button to have straight north side:
JButton button = new JButton("text");
button.putClientProperty(SubstanceLookAndFeel.BUTTON_SIDE_PROPERTY,
SubstanceConstants.Side.RIGHT.name());
BUTTON_OPEN_SIDE_PROPERTY
,
Constant Field Valuespublic static final java.lang.String BUTTON_OPEN_SIDE_PROPERTY
SubstanceConstants.Side
enum.
SubstanceConstants.Side
enum.
SubstanceConstants.Side
enum.
SubstanceConstants.Side
enum.
Example of marking a button to have open north side:
JButton button = new JButton("text");
Set openSides = new HashSet();
openSides.put(Side.TOP);
button.putClientProperty(SubstanceLookAndFeel.BUTTON_OPEN_SIDE_PROPERTY,
openSides);
BUTTON_SIDE_PROPERTY
,
Constant Field Valuespublic static final java.lang.String BUTTON_SHAPER_PROPERTY
If this property is used as a JVM flag, the value should be a fully-qualified name of the button shaper class. This class must have a default (no-argument) constructor.
If this property is used as a client property, the value can be one of:
String
- fully-qualified name of the button shaper class.SubstanceButtonShaper
object itself.Example of specifying a custom default button shaper as a VM flag:
-Dsubstancelaf.buttonShaper=org.jvnet.substance.button.ClassicButtonShaper
Example of using a shaper class name as client property value:
JButton b = new JButton("text");
b.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY,
"org.jvnet.substance.button.ClassicButtonShaper");
Example of using a SubstanceButtonShaper
object as client
property value:
JButton b = new JButton("text");
b.putClientProperty(SubstanceLookAndFeel.BUTTON_SHAPER_PROPERTY,
new ClassicButtonShaper());
getCurrentButtonShaper()
,
getCurrentButtonShaperName()
,
setCurrentButtonShaper(String)
,
setCurrentButtonShaper(SubstanceButtonShaper)
,
registerButtonShaperChangeListener(ButtonShaperChangeListener)
,
unregisterButtonShaperChangeListener(ButtonShaperChangeListener)
,
Constant Field Valuespublic static final java.lang.String CORNER_RADIUS
UIManager
. The
value should be a Float
instance.
Example of specifying a (toolbar) button to have corner radius of 5 pixels:
JButton button = new JButton("text");
button.putClientProperty(SubstanceLookAndFeel.CORNER_RADIUS,
Float.valueOf(5.0f));
Example of specifying all buttons of a toolbar to have corner radius of 3 pixels:
JToolBar toolbar = new JToolBar("toolbar");
toolbar.putClientProperty(SubstanceLookAndFeel.CORNER_RADIUS,
Float.valueOf(3.0f));
Example of specifying all toolbar buttons to have corner radius of 0 pixels:
UIManager.put(SubstanceLookAndFeel.CORNER_RADIUS, Float.valueOf(0.0f));
public static final java.lang.String FLAT_PROPERTY
Boolean.TRUE
or Boolean.FALSE
value. For example, this is
how to mark a button to appear flat:
JButton button = new JButton("text");
button.putClientProperty(SubstanceLookAndFeel.FLAT_PROPERTY,
Boolean.TRUE);
BUTTON_PAINT_NEVER_PROPERTY
,
Constant Field Valuespublic static final java.lang.String OVERLAY_PROPERTY
UIManager
. The value should be either Boolean.TRUE
or
Boolean.FALSE
.
Example of marking a scroll pane to have overlays on the scroll bars:
JPanel myPanel = new JPanel();
JScrollPane jsp = new JScrollPane(myPanel);
myPanel.putClientProperty(SubstanceLookAndFeel.OVERLAY_PROPERTY,
Boolean.TRUE);
Example of marking all application controls to have overlays:
UIManager.put(SubstanceLookAndFeel.OVERLAY_PROPERTY,
Boolean.TRUE);
public static final java.lang.String GRIP_PAINTER
GripPainter
interface.
Example of marking a scroll pane to have custom grip handles on its scroll bars:
JPanel myPanel = new JPanel();
JScrollPane jsp = new JScrollPane(myPanel);
myPanel.putClientProperty(SubstanceLookAndFeel.GRIP_PAINTER,
new DragBumpsGripPainter());
public static final java.lang.String GRADIENT_PAINTER_PROPERTY
For the JVM flag, the value should be fully-qualified name of the
gradient painter class. This class must have a default (no-argument)
constructor. For the client property, the value can be either a
fully-qualified class name as above or an instance of
SubstanceGradientPainter
.
Example of specifying a custom default gradient painter as a VM flag:
-Dsubstancelaf.gradientPainter=org.jvnet.substance.painter.SpecularGradientPainter
Example of using a painter class name as client property value:
JButton b = new JButton("text");
b.putClientProperty(SubstanceLookAndFeel.GRADIENT_PAINTER_PROPERTY,
"org.jvnet.substance.painter.SpecularGradientPainter");
Example of using a painter instance as client property value:
JButton b = new JButton("text");
b.putClientProperty(SubstanceLookAndFeel.GRADIENT_PAINTER_PROPERTY,
new SpecularGradientPainter());
getCurrentGradientPainter()
,
getCurrentGradientPainterName()
,
setCurrentGradientPainter(String)
,
setCurrentGradientPainter(SubstanceGradientPainter)
,
registerGradientPainterChangeListener(GradientPainterChangeListener)
,
unregisterGradientPainterChangeListener(GradientPainterChangeListener)
,
Constant Field Valuespublic static final java.lang.String TITLE_PAINTER_PROPERTY
For JVM flag, the value should be a fully-qualified name of the title
painter class. This class must have a default (no-argument) constructor.
For client property, the value should be either a fully-qualified class
name as above or an instance of SubstanceTitlePainter
.
Example of specifying a custom default title painter as a VM flag:
-Dsubstancelaf.titlePainter=org.jvnet.substance.title.ClassicTitlePainter
Example of using a painter class name as client property value:
JFrame fr = new JFrame("text");
fr.getRootPane().putClientProperty(SubstanceLookAndFeel.TITLE_PAINTER_PROPERTY,
"org.jvnet.substance.title.ClassicTitlePainter");
getCurrentTitlePainter()
,
getCurrentTitlePainterName()
,
setCurrentTitlePainter(String)
,
setCurrentTitlePainter(SubstanceTitlePainter)
,
registerTitlePainterChangeListener(TitlePainterChangeListener)
,
unregisterTitlePainterChangeListener(TitlePainterChangeListener)
,
Constant Field Valuespublic static final java.lang.String BORDER_PAINTER_PROPERTY
For JVM flag, the value should be a fully-qualified name of the border
painter class. This class must have a default (no-argument) constructor.
For client property, the value should be either a fully-qualified class
name as above or an instance of SubstanceBorderPainter
.
Example of specifying a custom default border painter as a VM flag:
-Dsubstancelaf.borderPainter=org.jvnet.substance.border.ClassicBorderPainter
Example of using a painter class name as client property value:
JButton button = new JButton("text");
button.putClientProperty(SubstanceLookAndFeel.BORDER_PAINTER_PROPERTY,
"org.jvnet.substance.border.ClassicBorderPainter");
getCurrentBorderPainter()
,
getCurrentBorderPainterName()
,
setCurrentBorderPainter(String)
,
setCurrentBorderPainter(SubstanceBorderPainter)
,
registerBorderPainterChangeListener(BorderPainterChangeListener)
,
unregisterBorderPainterChangeListener(BorderPainterChangeListener)
,
Constant Field Valuespublic static final java.lang.String HEAP_STATUS_PANEL
When this VM flag is set (no need to specify a value), the system menu on
decorated title panes will have a check box menu item that controls the
visibility of the heap status panel. The
permanentlyShowHeapStatusPanel(JRootPane)
(can be called only
when the VM flag is set) removes the above check box menu item and adds
the heap status panel to the title pane (if it wasn't shown prior to
calling that method). The
permanentlyHideHeapStatusPanel(JRootPane)
(can be called only
when the VM flag is set) removes the above check box menu item and
removes the heap status panel to the title pane (if it was shown prior to
calling that method).
-Dsubstancelaf.heapStatusPanel
permanentlyHideHeapStatusPanel(JRootPane)
,
permanentlyShowHeapStatusPanel(JRootPane)
,
Constant Field Valuespublic static final java.lang.String WINDOW_MODIFIED
JInternalFrame
- the close button of the specific
internal frame will be animated (in case that the internal frame has
decorated title pane). In addition, once such internal frame is iconified
(to a JInternalFrame.JDesktopIcon
), the close button of the
matching desktop icon is animated as well.JRootPane
- the close button of the title pane of
the matching frame / dialog will be animated (in case that the frame /
dialog have decorated title pane).JComponent
in a JTabbedPane
. Based on the
TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION
property presence,
either the entire tab or its close button area is animated. In this case,
this property must be set on the tab component itself, not on one
of its child components.
The animation cycles between red, orange and yellow themes. In most cases
(all but tabs not marked with
TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION
property), the
animation will be visible only when the mouse hovers over the close
button of the matching container (frame, dialog, internal frame, desktop
icon, tab). The tooltip of the close button is changed as well to reflect
that the container contents are marked as modified.
Here is a sample text editing application that illustrates the use of this property. Once the contents of the text pane are changed, the frame is marked as modified. The Save button marks the frame as not-modified. In the real application, the listener on this button will need to persist the changes as well.
public class Changer extends JFrame {
public Changer() {
super("Changer");
this.setLayout(new BorderLayout());
JTextPane textArea = new JTextPane();
this.add(textArea, BorderLayout.CENTER);
textArea.getDocument().addDocumentListener(new
DocumentListener() {
private void handleChange() {
getRootPane().putClientProperty(
SubstanceLookAndFeel.WINDOW_MODIFIED,
Boolean.TRUE);
}
public void
changedUpdate(DocumentEvent e) {
handleChange();
}
public void
insertUpdate(DocumentEvent e) {
handleChange();
}
public void
removeUpdate(DocumentEvent e) {
handleChange();
}
});
JPanel buttons = new JPanel(new
FlowLayout(FlowLayout.RIGHT));
JButton saveButton = new JButton("Save");
saveButton.addActionListener(new ActionListener() {
public void
actionPerformed(ActionEvent e) {
getRootPane().putClientProperty(
SubstanceLookAndFeel.WINDOW_MODIFIED,
Boolean.FALSE);
}
});
buttons.add(saveButton);
this.add(buttons, BorderLayout.SOUTH);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String ... args) {
try {
UIManager.setLookAndFeel(new
SubstanceLookAndFeel());
}
catch (Exception exc) {}
JFrame.setDefaultLookAndFeelDecorated(true);
Changer ch = new Changer();
ch.setPreferredSize(new Dimension(200, 200));
ch.setSize(ch.getPreferredSize());
ch.setLocationRelativeTo(null);
ch.setVisible(true);
}
}
public static final java.lang.String BACKGROUND_COMPOSITE
UIManager
. The value should be an instance of
ControlBackgroundComposite
. Available core implementations
include AlphaControlBackgroundComposite
,
DefaultControlBackgroundComposite
and
DecayControlBackgroundComposite
.
Note that setting this property on a container (such as
JScrollPane
) will affect all its children (recursively) unless
they set this property.
Example of setting a custom background composite on a scroll pane (will affect the painting of the scroll bars and all its children):
JPanel myPanel = new JPanel();
JScrollPane jsp = new JScrollPane(myPanel);
myPanel.putClientProperty(SubstanceLookAndFeel.BACKGROUND_COMPOSITE,
new AlphaControlBackgroundComposite(0.4f, 0.7f));
Example of marking all application controls with the same background composite:
UIManager.put(SubstanceLookAndFeel.BACKGROUND_COMPOSITE,
new AlphaControlBackgroundComposite(0.6f));
public static final java.lang.String TABBED_PANE_CLOSE_BUTTONS_PROPERTY
JTabbedPane
itself (will hold for all tab components that don't
define this property) or on UIManager
. The value should be
either Boolean.TRUE
or Boolean.FALSE
. By default, the
close buttons are not displayed.
Example of setting that all tabs in the application will have close buttons:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
Boolean.TRUE);
A more complex example:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
Boolean.TRUE);
JTabbedPane jtpMain = new JTabbedPane();
JTabbedPane jtpSecondary = new JTabbedPane();
jtpSecondary.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
Boolean.FALSE);
JPanel panelSecondary = new JPanel();
jtpMain.addTab(jtpSecondary);
jtpMain.addTab(panelSecondary);
JPanel tab1 = new JPanel();
JPanel tab2 = new JPanel();
tab2.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_PROPERTY,
Boolean.TRUE);
jtpSecondary.addTab(tab1);
jtpSecondary.addTab(tab2);
In the example above, the first first-level child (jtpSecondary) doesn't have the close button (since it overrides the global setting). The second first-level child tab (panelSecondary) has close button (from the global UIManager setting). The first second-level tab doesn't have the close button (setting inherited from the parent jtpSecondary tab that overrides the global setting). The second second-level tab has the close button (since its setting overrides the parent setting).
TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION
,
TABBED_PANE_CLOSE_CALLBACK
,
Constant Field Valuespublic static final java.lang.String TABBED_PANE_VERTICAL_ORIENTATION
SwingConstants.LEFT
and SwingConstants.RIGHT
tab
placements. This property can be specified either on a single
JTabbedPane
or on UIManager
. The value should be either
Boolean.TRUE
or Boolean.FALSE
. By default, the tab
orientation on all placements is horizontal.
Example of setting that all tabbed panes in the application will be vertically oriented:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_VERTICAL_ORIENTATION,
Boolean.TRUE);
Example of specifying that the specific tabbed pane will be vertically oriented:
JTabbedPane jtpMain = new JTabbedPane();
jtpMain.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_VERTICAL_ORIENTATION,
Boolean.TRUE);
TABBED_PANE_VERTICAL_ORIENTATION_ROTATE_ICONS
,
Constant Field Valuespublic static final java.lang.String TABBED_PANE_VERTICAL_ORIENTATION_ROTATE_ICONS
JTabbedPane
itself (will hold for all tab components that don't
define this property) or on UIManager
. The value should be
either Boolean.TRUE
or Boolean.FALSE
. By default, the
vertically oriented tabs will have the rotated icons. In case the icon
internal layout has horizontal / vertical meaning, using this property
with value Boolean.TRUE
will preserve the icon orientation. Note
that this setting is only relevant for tabs marked with
TABBED_PANE_VERTICAL_ORIENTATION
property.
Example of setting that all vertically-oriented tabs in the application will have unrotated icons:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_VERTICAL_ORIENTATION_ROTATE_ICONS,
Boolean.TRUE);
An example of tabbed pane with two different kinds of icon orientation:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_VERTICAL_ORIENTATION_ROTATE_ICONS,
Boolean.TRUE);
JTabbedPane jtp = new JTabbedPane();
jtp.setTabPlacement(SwingConstants.LEFT);
JPanel tab1 = new JPanel();
JPanel tab2 = new JPanel();
tab2.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_VERTICAL_ORIENTATION_ROTATE_ICONS,
Boolean.FALSE);
jtp.addTab(tab1);
jtp.addTab(tab2);
In the example above, the first tab (tab1) has the
horizontally-oriented icon (the same as with SwingConstants.TOP
or SwingConstants.BOTTOM
) , while the second tab (tab2)
has the rotated icon (oriented along the tab text).
TABBED_PANE_VERTICAL_ORIENTATION
,
Constant Field Valuespublic static final java.lang.String TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION
JTabbedPane
itself
(will hold for all tab components that don't define this property) or on
UIManager
. The value should be either Boolean.TRUE
or
Boolean.FALSE
. By default, the animation on modified tabs is on
the entire tab rectangle. Note that this setting is only relevant for
tabs marked with WINDOW_MODIFIED
property.
Example of setting that all tabs in the application will have modified animation on close button:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
Boolean.TRUE);
A more complex example:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
Boolean.TRUE);
JTabbedPane jtpMain = new JTabbedPane();
JTabbedPane jtpSecondary = new JTabbedPane();
jtpSecondary.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
Boolean.FALSE);
JPanel panelSecondary = new JPanel();
jtpMain.addTab(jtpSecondary);
jtpMain.addTab(panelSecondary);
JPanel tab1 = new JPanel();
JPanel tab2 = new JPanel();
tab2.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CLOSE_BUTTONS_MODIFIED_ANIMATION,
Boolean.TRUE);
jtpSecondary.addTab(tab1);
jtpSecondary.addTab(tab2);
In the example above, the first first-level child (jtpSecondary) has the animation on the entire tab (since it overrides the global setting). The second first-level child tab (panelSecondary) has animation on the close button (from the global UIManager setting). The first second-level tab has the animation on the entire tab (setting inherited from the parent jtpSecondary tab that overrides the global setting). The second second-level tab has animation on the close button (since its setting overrides the parent setting).
TABBED_PANE_CLOSE_BUTTONS_PROPERTY
,
TABBED_PANE_CLOSE_CALLBACK
,
Constant Field Valuespublic static final java.lang.String TABBED_PANE_CLOSE_CALLBACK
JTabbedPane
itself (will hold for all tab components that don't
define this property) or on UIManager
. The value should be an
instance of TabCloseCallback
. Note that this setting is only
relevant for tabs marked with TABBED_PANE_CLOSE_BUTTONS_PROPERTY
property.
Example of custom tab close callback set on a tabbed pane:
TabCloseCallback closeCallback = new TabCloseCallback() {
public TabCloseKind onAreaClick(JTabbedPane tabbedPane,
int tabIndex, MouseEvent mouseEvent) {
if (mouseEvent.getButton() != MouseEvent.BUTTON3)
return TabCloseKind.NONE;
if (mouseEvent.isShiftDown()) {
return TabCloseKind.ALL;
}
return TabCloseKind.THIS;
}
public TabCloseKind onCloseButtonClick(JTabbedPane tabbedPane,
int tabIndex, MouseEvent mouseEvent) {
if (mouseEvent.isAltDown()) {
return TabCloseKind.ALL_BUT_THIS;
}
if (mouseEvent.isShiftDown()) {
return TabCloseKind.ALL;
}
return TabCloseKind.THIS;
}
public String getAreaTooltip(JTabbedPane tabbedPane, int tabIndex) {
return null;
}
public String getCloseButtonTooltip(JTabbedPane tabbedPane,
int tabIndex) {
StringBuffer result = new StringBuffer();
result.append("<html><body>");
result.append("Mouse click closes <b>"
+ tabbedPane.getTitleAt(tabIndex) + "</b> tab");
result.append("<br><b>Alt</b>-Mouse click closes all tabs but <b>"
+ tabbedPane.getTitleAt(tabIndex) + "</b> tab");
result.append("<br><b>Shift</b>-Mouse click closes all tabs");
result.append("</body></html>");
return result.toString();
}
};
JTabbedPane jtp = new JTabbedPane();
jtp.putClientProperty(
SubstanceLookAndFeel.TABBED_PANE_CLOSE_CALLBACK,
closeCallback);
public static final java.lang.String TABBED_PANE_TEXT_ALIGNMENT_KIND
SwingConstants.LEFT
and SwingConstants.RIGHT
tab
placements. This property can be specified either on a single
JTabbedPane
or on UIManager
. The value should be one of
SubstanceConstants.TabTextAlignmentKind
enum. By default, the
text alignment is SubstanceConstants.TabTextAlignmentKind#DEFAULT
(centered).
Example of setting that all tabbed panes in the application will follow placement for the text alignment:
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_TEXT_ALIGNMENT_KIND,
TabTextAlignmentKind.FOLLOW_PLACEMENT);
Example of specifying that the specific tabbed pane will follow placement for the text alignment:
JTabbedPane jtpMain = new JTabbedPane();
jtpMain.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_TEXT_ALIGNMENT_KIND,
TabTextAlignmentKind.FOLLOW_PLACEMENT);
public static final java.lang.String TABBED_PANE_CONTENT_BORDER_KIND
JTabbedPane
or on
UIManager
. The value should be one of
SubstanceConstants.TabContentPaneBorderKind
enum. By default, the
border kind is
SubstanceConstants.TabContentPaneBorderKind#DOUBLE_FULL
.
Example of setting that all tabbed panes in the application have single full border (default setting prior to version 4.1):
UIManager.put(SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND,
TabContentPaneBorderKind.SINGLE_FULL);
Example of specifying that the specific tabbed pane has single full border (default setting prior to version 4.1):
JTabbedPane jtpMain = new JTabbedPane();
jtpMain.putClientProperty(SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND,
TabContentPaneBorderKind.SINGLE_FULL);
public static final java.lang.String COMBO_BOX_POPUP_FLYOUT_ORIENTATION
JComboBox
or globally on
UIManager
. The value should be one of the Integer
s
below:
SwingConstants.SOUTH
- the popup is displayed
directly below the combo aligned to the left.
SwingConstants.NORTH
- the popup is displayed directly above
the combo aligned to the left.
SwingConstants.EAST
- the popup is displayed to the left of
the combo aligned to the top.
SwingConstants.WEST
- the popup is displayed to the right of
the combo aligned to the top.
SwingConstants.CENTER
- the popup is displayed centered
vertically over the combo aligned to the left.
Note that the combo arrow changes in accordance with the combo popup flyout orientation. Example of setting a combobox with a custom flyout orientation:
JComboBox cb = new JComboBox(
new Object[] { "Ester", "Jordi", "Jordina", "Jorge", "Sergi" });
cb.putClientProperty(SubstanceLookAndFeel.COMBO_BOX_POPUP_FLYOUT_ORIENTATION,
SwingConstants.CENTER);
COMBO_POPUP_PROTOTYPE
,
Constant Field Valuespublic static final java.lang.String SCROLL_PANE_BUTTONS_POLICY
JScrollPane
or globally
on UIManager
. The value should be one of the
SubstanceConstants.ScrollPaneButtonPolicyKind
enum. Example of
setting a scroll pane with a custom button policy:
JScrollPane jsp = new JScrollPane(new JPanel());
jsp.putClientProperty(SubstanceLookAndFeel.SCROLL_PANE_BUTTONS_POLICY,
ScrollPaneButtonPolicyKind.MULTIPLE);
public static final java.lang.String NO_EXTRA_ELEMENTS
UIManager
. In the latter case, the value should be either
Boolean.TRUE
or Boolean.FALSE
. Partial list of UI
elements that will not be present when this property is specified:
Example of setting this property via VM flag:
-Dsubstancelaf.noExtraElements
Example of setting this property on UIManager
:
UIManager.put(SubstanceLookAndFeel.NO_EXTRA_ELEMENTS, Boolean.TRUE);
SwingUtilities.updateComponentTree(myFrame);
toShowExtraElements
,
Constant Field Valuespublic static final java.lang.String MENU_GUTTER_FILL_KIND
SubstanceConstants.MenuGutterFillKind
enum. This property can be set
globally on the UIManager
. The default value is
SubstanceConstants.MenuGutterFillKind.HARD
.
Example of setting soft fill kind:
UIManager.put(SubstanceLookAndFeel.MENU_GUTTER_FILL_KIND, MenuGutterFillKind.SOFT);
public static final java.lang.String FOCUS_KIND
SubstanceConstants.FocusKind
enum. This property can be set
either as client property on some component or as global property on
UIManager
.
In order to compute the kind of focus indication for some component, the
component's hierarchy is traversed bottom up. The first component that
has this property set, defines the focus indication kind. Finally, if
neither component not its ancestors define this property, the global
setting on UIManager
is checked. If there is no global setting,
the default SubstanceConstants.FocusKind#ALL_INNER
is used. Here
is an example to illustrate the above:
JPanel topPanel = new JPanel();
topPanel.putClientProperty(SubstanceLookAndFeel.FOCUS_KIND, FocusKind.UNDERLINE);
JPanel panel1 = new JPanel();
JButton b1 = new JButton("button1");
b1.putClientProperty(SubstanceLookAndFeel.FOCUS_KIND, FocusKind.TEXT);
JButton b2 = new JButton("button2");
JButton b3 = new JButton("button3");
b3.putClientProperty(SubstanceLookAndFeel.FOCUS_KIND, FocusKind.ALL_INNER);
panel1.add(b1);
panel1.add(b2);
topPanel.add(panel1);
topPanel.add(b3);
In the code above:
SubstanceConstants.FocusKind#NONE
focus kind which is set
directly on the button.
SubstanceConstants.FocusKind#UNDERLINE
focus kind which is
inherited from its topPanel parent.
SubstanceConstants.FocusKind#ALL_INNER
focus kind which is set
directly on the button.
SubstanceConstants.FocusKind
,
Constant Field Valuespublic static final java.lang.String COMBO_POPUP_PROTOTYPE
ComboPopupPrototypeCallback
- will provide
application-specific logic at runtime.
Object
- will point to the prototype entry itself.
This property can be set either on a specific JComboBox
or
globally on UIManager
.
Here is an example of combo popup prototype set to a model element:
JComboBox comboProto1 = new JComboBox(new Object[] { "aa", "aaaaa",
"aaaaaaaaaa", "this one is the one", "aaaaaaaaaaaaaaaaaaaaa" });
comboProto1.setPrototypeDisplayValue("aaaaa");
comboProto1.putClientProperty(SubstanceLookAndFeel.COMBO_POPUP_PROTOTYPE,
"this one is the one");
Here is an example of combo popup prototype set to a dynamic callback. This callback always returns the last model element:
JComboBox comboProto3 = new JComboBox(new Object[] { "aa", "aaaaa",
"this is not", "this one is not it",
"this one is it that is for the popup" });
comboProto3.setPrototypeDisplayValue("aaaaa");
comboProto3.putClientProperty(SubstanceLookAndFeel.COMBO_POPUP_PROTOTYPE,
new ComboPopupPrototypeCallback() {
public Object getPopupPrototypeDisplayValue(JComboBox jc) {
return jc.getModel().getElementAt(
jc.getModel().getSize() - 1);
}
});
COMBO_BOX_POPUP_FLYOUT_ORIENTATION
,
Constant Field Valuespublic static final java.lang.String TRACE_FILE
-Dsubstancelaf.traceFile=C:/temp/myApp.substance.log
MemoryAnalyzer
,
Constant Field Valuespublic static final java.lang.String CONFIG_FILE
Properties
format. Example of specifying configuration file:
-Dsubstancelaf.configFile=C:/myConfigSubstance.properties
public static final java.lang.String ENABLE_INVERTED_THEMES
UIManager
. In the latter case, the value should be either
Boolean.TRUE
or Boolean.FALSE
. When this property is
set, the getAllThemes()
method will return entries for all
SubstanceTheme.ThemeKind#BRIGHT
and
SubstanceTheme.ThemeKind#COLD
themes. All these entries will be
marked with SubstanceTheme.ThemeKind#INVERTED
kind.
Example of setting this property via VM flag:
-Dsubstancelaf.enableInvertedThemes
Example of setting this property on UIManager
:
UIManager.put(SubstanceLookAndFeel.ENABLE_INVERTED_THEMES,
Boolean.TRUE);
ENABLE_NEGATED_THEMES
,
Constant Field Valuespublic static final java.lang.String ENABLE_NEGATED_THEMES
UIManager
. In the latter case, the value should be either
Boolean.TRUE
or Boolean.FALSE
. When this property is
set, the getAllThemes()
method will return entries for all
SubstanceTheme.ThemeKind#BRIGHT
and
SubstanceTheme.ThemeKind#COLD
themes. All these entries will be
marked with SubstanceTheme.ThemeKind#NEGATED
kind.
Example of setting this property via VM flag:
-Dsubstancelaf.enableNegatedThemes
Example of setting this property on UIManager
:
UIManager.put(SubstanceLookAndFeel.ENABLE_NEGATED_THEMES,
Boolean.TRUE);
ENABLE_INVERTED_THEMES
,
Constant Field Valuespublic static final java.lang.String PASSWORD_ECHO_PER_CHAR
Integer
, otherwise will be ignored. This property can be set
either on a specific JPasswordField
or globally on
UIManager
.
Example of having all password fields echo 3 characters per each typed user character:
UIManager.put(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR,
new Integer(3));
Example of having a specific password field echo 2 characters per each typed user character:
JPasswordField jpf = new JPasswordField();
jpf.putClientProperty(SubstanceLookAndFeel.PASSWORD_ECHO_PER_CHAR,
new Integer(2));
public static final java.lang.String USE_THEMED_DEFAULT_ICONS
Client property name for specifying that icons on buttons and toggle
buttons should match the color of the current theme when they are in
default state. The button is in default state when it's not pressed, not
selected, not armed and not rolled over. The value should be an instance
of Boolean
. By default, all buttons show regular (full-color
original) icons. The value can be set on the specific button or globally
on UIManager
.
Example of marking a button to have theme-matching icon in default state:
JButton jb = new JButton("sample", myIcon);
jb.putClientProperty(SubstanceLookAndFeel.USE_THEMED_DEFAULT_ICONS,
Boolean.TRUE);
protected static final java.lang.String SUBSTANCE_FONT_POLICY_KEY
setFontPolicy(FontPolicy)
,
getFontPolicy()
,
Constant Field Valuesprotected static ParamReader paramReader
Constructor Detail |
---|
public SubstanceLookAndFeel()
Method Detail |
---|
public static java.util.ResourceBundle getLabelBundle()
resetLabelBundle()
public static java.util.ResourceBundle getLabelBundle(java.util.Locale locale)
locale
- Locale.
public static void resetLabelBundle()
getLabelBundle()
public static SubstanceTheme getTheme()
getCurrentThemeName()
,
setCurrentTheme(String)
,
setCurrentTheme(SubstanceTheme)
,
setCurrentTheme(ThemeInfo)
,
registerThemeChangeListener(ThemeChangeListener)
,
unregisterThemeChangeListener(ThemeChangeListener)
,
THEME_PROPERTY
public static ColorScheme getActiveColorScheme()
getDefaultColorScheme()
,
getDisabledColorScheme()
public static ColorScheme getDefaultColorScheme()
getActiveColorScheme()
,
getDisabledColorScheme()
public static ColorScheme getDisabledColorScheme()
getActiveColorScheme()
,
getDefaultColorScheme()
public static boolean setCurrentTheme(java.lang.String themeClassName)
SwingUtilities.updateComponentTreeUI(java.awt.Component)
on
all open frames (call Frame.getFrames()
to get a list of all open
frames).
themeClassName
- Theme class name (full qualified).
getCurrentThemeName()
,
getTheme()
,
setCurrentTheme(SubstanceTheme)
,
setCurrentTheme(ThemeInfo)
,
registerThemeChangeListener(ThemeChangeListener)
,
unregisterThemeChangeListener(ThemeChangeListener)
,
THEME_PROPERTY
public static boolean setCurrentTheme(ThemeInfo themeInfo)
SwingUtilities.updateComponentTreeUI(java.awt.Component)
on
all open frames (call Frame.getFrames()
to get a list of all open
frames).
themeInfo
- Theme information.
getCurrentThemeName()
,
getTheme()
,
setCurrentTheme(String)
,
setCurrentTheme(SubstanceTheme)
,
registerThemeChangeListener(ThemeChangeListener)
,
unregisterThemeChangeListener(ThemeChangeListener)
,
THEME_PROPERTY
public static boolean setCurrentTheme(SubstanceTheme theme)
SwingUtilities.updateComponentTreeUI(java.awt.Component)
on
all open frames (call Frame.getFrames()
to get a list of all open
frames).
theme
- Theme object.
getCurrentThemeName()
,
getTheme()
,
setCurrentTheme(String)
,
setCurrentTheme(ThemeInfo)
,
registerThemeChangeListener(ThemeChangeListener)
,
unregisterThemeChangeListener(ThemeChangeListener)
,
THEME_PROPERTY
public static java.lang.String getCurrentThemeName()
getTheme()
,
setCurrentTheme(String)
,
setCurrentTheme(SubstanceTheme)
,
setCurrentTheme(ThemeInfo)
,
registerThemeChangeListener(ThemeChangeListener)
,
unregisterThemeChangeListener(ThemeChangeListener)
,
THEME_PROPERTY
public static java.util.Map<java.lang.String,ThemeInfo> getAllThemes()
public static java.lang.String getCurrentWatermarkName()
getCurrentWatermark()
,
setCurrentWatermark(String)
,
setCurrentWatermark(SubstanceWatermark)
,
registerWatermarkChangeListener(WatermarkChangeListener)
,
unregisterWatermarkChangeListener(WatermarkChangeListener)
,
WATERMARK_PROPERTY
public static java.util.Map<java.lang.String,WatermarkInfo> getAllWatermarks()
public static SubstanceWatermark getCurrentWatermark()
getCurrentWatermarkName()
,
setCurrentWatermark(String)
,
setCurrentWatermark(SubstanceWatermark)
,
registerWatermarkChangeListener(WatermarkChangeListener)
,
unregisterWatermarkChangeListener(WatermarkChangeListener)
,
WATERMARK_PROPERTY
public static boolean setCurrentWatermark(java.lang.String watermarkClassName)
watermarkClassName
- Watermark class name (full qualified).
getCurrentWatermark()
,
getCurrentWatermarkName()
,
setCurrentWatermark(SubstanceWatermark)
,
registerWatermarkChangeListener(WatermarkChangeListener)
,
unregisterWatermarkChangeListener(WatermarkChangeListener)
,
WATERMARK_PROPERTY
public static boolean setCurrentWatermark(SubstanceWatermark currentWatermark)
currentWatermark
- Watermark object.
getCurrentWatermark()
,
getCurrentWatermarkName()
,
setCurrentWatermark(String)
,
registerWatermarkChangeListener(WatermarkChangeListener)
,
unregisterWatermarkChangeListener(WatermarkChangeListener)
,
WATERMARK_PROPERTY
public static java.lang.String getCurrentButtonShaperName()
getCurrentButtonShaperName()
,
setCurrentButtonShaper(String)
,
setCurrentButtonShaper(SubstanceButtonShaper)
,
registerButtonShaperChangeListener(ButtonShaperChangeListener)
,
unregisterButtonShaperChangeListener(ButtonShaperChangeListener)
,
BUTTON_SHAPER_PROPERTY
public static java.util.Map<java.lang.String,ButtonShaperInfo> getAllButtonShapers()
public static SubstanceButtonShaper getCurrentButtonShaper()
getCurrentButtonShaperName()
,
setCurrentButtonShaper(String)
,
setCurrentButtonShaper(SubstanceButtonShaper)
,
registerButtonShaperChangeListener(ButtonShaperChangeListener)
,
unregisterButtonShaperChangeListener(ButtonShaperChangeListener)
,
BUTTON_SHAPER_PROPERTY
public static boolean setCurrentButtonShaper(java.lang.String buttonShaperClassName)
buttonShaperClassName
- Button shaper class name (full qualified).
getCurrentButtonShaper()
,
getCurrentButtonShaperName()
,
setCurrentButtonShaper(SubstanceButtonShaper)
,
registerButtonShaperChangeListener(ButtonShaperChangeListener)
,
unregisterButtonShaperChangeListener(ButtonShaperChangeListener)
,
BUTTON_SHAPER_PROPERTY
public static boolean setCurrentButtonShaper(SubstanceButtonShaper currentButtonShaper)
currentButtonShaper
- Button shaper object.
getCurrentButtonShaper()
,
getCurrentButtonShaperName()
,
setCurrentButtonShaper(String)
,
registerButtonShaperChangeListener(ButtonShaperChangeListener)
,
unregisterButtonShaperChangeListener(ButtonShaperChangeListener)
,
BUTTON_SHAPER_PROPERTY
public static java.lang.String getCurrentGradientPainterName()
getCurrentGradientPainter()
,
setCurrentGradientPainter(String)
,
setCurrentGradientPainter(SubstanceGradientPainter)
,
registerGradientPainterChangeListener(GradientPainterChangeListener)
,
unregisterGradientPainterChangeListener(GradientPainterChangeListener)
,
GRADIENT_PAINTER_PROPERTY
public static java.util.Map<java.lang.String,GradientPainterInfo> getAllGradientPainters()
public static SubstanceGradientPainter getCurrentGradientPainter()
getCurrentGradientPainterName()
,
setCurrentGradientPainter(String)
,
setCurrentGradientPainter(SubstanceGradientPainter)
,
registerGradientPainterChangeListener(GradientPainterChangeListener)
,
unregisterGradientPainterChangeListener(GradientPainterChangeListener)
,
GRADIENT_PAINTER_PROPERTY
public static boolean setCurrentGradientPainter(java.lang.String gradientPainterClassName)
gradientPainterClassName
- Gradient painter class name (full qualified).
getCurrentGradientPainter()
,
getCurrentGradientPainterName()
,
setCurrentGradientPainter(SubstanceGradientPainter)
,
registerGradientPainterChangeListener(GradientPainterChangeListener)
,
unregisterGradientPainterChangeListener(GradientPainterChangeListener)
,
GRADIENT_PAINTER_PROPERTY
public static boolean setCurrentGradientPainter(SubstanceGradientPainter currentGradientPainter)
currentGradientPainter
- Gradient painter object.
getCurrentGradientPainter()
,
getCurrentGradientPainterName()
,
setCurrentGradientPainter(String)
,
registerGradientPainterChangeListener(GradientPainterChangeListener)
,
unregisterGradientPainterChangeListener(GradientPainterChangeListener)
,
GRADIENT_PAINTER_PROPERTY
public static java.lang.String getCurrentTitlePainterName()
getCurrentTitlePainter()
,
setCurrentTitlePainter(String)
,
setCurrentTitlePainter(SubstanceTitlePainter)
,
registerTitlePainterChangeListener(TitlePainterChangeListener)
,
unregisterTitlePainterChangeListener(TitlePainterChangeListener)
,
TITLE_PAINTER_PROPERTY
public static java.util.Map<java.lang.String,TitlePainterInfo> getAllTitlePainters()
public static SubstanceTitlePainter getCurrentTitlePainter()
getCurrentTitlePainterName()
,
setCurrentTitlePainter(String)
,
setCurrentTitlePainter(SubstanceTitlePainter)
,
registerTitlePainterChangeListener(TitlePainterChangeListener)
,
unregisterTitlePainterChangeListener(TitlePainterChangeListener)
,
TITLE_PAINTER_PROPERTY
public static boolean setCurrentTitlePainter(java.lang.String titlePainterClassName)
titlePainterClassName
- Title painter class name (full qualified).
getCurrentTitlePainter()
,
getCurrentTitlePainterName()
,
setCurrentTitlePainter(SubstanceTitlePainter)
,
registerTitlePainterChangeListener(TitlePainterChangeListener)
,
unregisterTitlePainterChangeListener(TitlePainterChangeListener)
,
TITLE_PAINTER_PROPERTY
public static boolean setCurrentTitlePainter(SubstanceTitlePainter currentTitlePainter)
currentTitlePainter
- Title painter object.
getCurrentTitlePainter()
,
getCurrentTitlePainterName()
,
setCurrentTitlePainter(String)
,
registerTitlePainterChangeListener(TitlePainterChangeListener)
,
unregisterTitlePainterChangeListener(TitlePainterChangeListener)
,
TITLE_PAINTER_PROPERTY
public static java.lang.String getCurrentBorderPainterName()
getCurrentBorderPainter()
,
setCurrentBorderPainter(String)
,
setCurrentBorderPainter(SubstanceBorderPainter)
,
registerBorderPainterChangeListener(BorderPainterChangeListener)
,
unregisterBorderPainterChangeListener(BorderPainterChangeListener)
,
BORDER_PAINTER_PROPERTY
public static java.util.Map<java.lang.String,BorderPainterInfo> getAllBorderPainters()
public static SubstanceBorderPainter getCurrentBorderPainter()
getCurrentBorderPainterName()
,
setCurrentBorderPainter(String)
,
setCurrentBorderPainter(SubstanceBorderPainter)
,
registerBorderPainterChangeListener(BorderPainterChangeListener)
,
unregisterBorderPainterChangeListener(BorderPainterChangeListener)
,
BORDER_PAINTER_PROPERTY
public static boolean setCurrentBorderPainter(java.lang.String borderPainterClassName)
borderPainterClassName
- Border painter class name (full qualified).
getCurrentBorderPainter()
,
getCurrentBorderPainterName()
,
setCurrentBorderPainter(SubstanceBorderPainter)
,
registerBorderPainterChangeListener(BorderPainterChangeListener)
,
unregisterBorderPainterChangeListener(BorderPainterChangeListener)
,
BORDER_PAINTER_PROPERTY
public static boolean setCurrentBorderPainter(SubstanceBorderPainter currentBorderPainter)
currentBorderPainter
- Border painter object.
getCurrentBorderPainter()
,
getCurrentBorderPainterName()
,
setCurrentBorderPainter(String)
,
registerBorderPainterChangeListener(BorderPainterChangeListener)
,
unregisterBorderPainterChangeListener(BorderPainterChangeListener)
,
BORDER_PAINTER_PROPERTY
public java.lang.String getDescription()
getDescription
in class javax.swing.LookAndFeel
public java.lang.String getID()
getID
in class javax.swing.LookAndFeel
public java.lang.String getName()
getName
in class javax.swing.LookAndFeel
public boolean isNativeLookAndFeel()
isNativeLookAndFeel
in class javax.swing.LookAndFeel
public boolean isSupportedLookAndFeel()
isSupportedLookAndFeel
in class javax.swing.LookAndFeel
protected void initClassDefaults(javax.swing.UIDefaults table)
initClassDefaults
in class javax.swing.plaf.basic.BasicLookAndFeel
protected void initComponentDefaults(javax.swing.UIDefaults table)
initComponentDefaults
in class javax.swing.plaf.basic.BasicLookAndFeel
public static void setFontPolicy(FontPolicy fontPolicy)
FontPolicy
to be used with Substance family. If the
specified policy is null
, the default will be reset. Note
that after calling this method you need to call
UIManager.setLookAndFeel(LookAndFeel)
with Substance and
SwingUtilities.updateComponentTreeUI(Component)
to have the new
font policy applied to your windows.
fontPolicy
- The FontPolicy
to be used with Substance family, or
null
to reset to the defaultgetFontPolicy()
,
SUBSTANCE_FONT_POLICY_KEY
public static FontPolicy getFontPolicy()
FontPolicy
used by the Substance
family. If a FontPolicy
has been set, it'll be returned.
Otherwise, this method checks if a FontPolicy
or FontSet
is defined in the system properties or UIDefaults. If so, it is returned.
If no FontPolicy
has been set for this look, in the system
properties or UIDefaults
, the default Substance font policy will
be returned.
FontPolicy
set for this Look&feel - if any, the
FontPolicy
specified in the system properties or
UIDefaults
- if any, or the default Substance font
policy.setFontPolicy(org.jvnet.substance.fonts.FontPolicy)
,
FontPolicies
,
FontPolicies.customSettingsPolicy(FontPolicy)
public javax.swing.UIDefaults getDefaults()
getDefaults
in class javax.swing.plaf.basic.BasicLookAndFeel
public void initialize()
initialize
in class javax.swing.plaf.basic.BasicLookAndFeel
public void uninitialize()
uninitialize
in class javax.swing.plaf.basic.BasicLookAndFeel
public static void stopThreads()
public static java.util.Set getPlugins()
LafPlugin
.
public static void registerSkinChangeListener(SkinChangeListener skinChangeListener)
skinChangeListener
- New listener on skin change.setSkin(String)
,
setSkin(SubstanceSkin)
,
unregisterSkinChangeListener(SkinChangeListener)
public static void unregisterSkinChangeListener(SkinChangeListener skinChangeListener)
skinChangeListener
- The listener to unregister.setSkin(String)
,
setSkin(SubstanceSkin)
,
registerSkinChangeListener(SkinChangeListener)
public static void registerThemeChangeListener(ThemeChangeListener themeChangeListener)
themeChangeListener
- New listener on theme change.getCurrentThemeName()
,
getTheme()
,
setCurrentTheme(String)
,
setCurrentTheme(SubstanceTheme)
,
setCurrentTheme(ThemeInfo)
,
unregisterThemeChangeListener(ThemeChangeListener)
,
THEME_PROPERTY
public static void unregisterThemeChangeListener(ThemeChangeListener themeChangeListener)
themeChangeListener
- The listener to unregister.getCurrentThemeName()
,
getTheme()
,
setCurrentTheme(String)
,
setCurrentTheme(SubstanceTheme)
,
setCurrentTheme(ThemeInfo)
,
registerThemeChangeListener(ThemeChangeListener)
,
THEME_PROPERTY
public static void registerWatermarkChangeListener(WatermarkChangeListener watermarkChangeListener)
watermarkChangeListener
- New listener on watermark change.getCurrentWatermark()
,
getCurrentWatermarkName()
,
setCurrentWatermark(String)
,
setCurrentWatermark(SubstanceWatermark)
,
unregisterWatermarkChangeListener(WatermarkChangeListener)
,
WATERMARK_PROPERTY
public static void unregisterWatermarkChangeListener(WatermarkChangeListener watermarkChangeListener)
watermarkChangeListener
- The listener to unregister.getCurrentWatermark()
,
getCurrentWatermarkName()
,
setCurrentWatermark(String)
,
setCurrentWatermark(SubstanceWatermark)
,
registerWatermarkChangeListener(WatermarkChangeListener)
,
WATERMARK_PROPERTY
public static void registerButtonShaperChangeListener(ButtonShaperChangeListener buttonShaperChangeListener)
buttonShaperChangeListener
- New listener on button shaper change.getCurrentButtonShaper()
,
getCurrentButtonShaperName()
,
setCurrentButtonShaper(String)
,
setCurrentButtonShaper(SubstanceButtonShaper)
,
unregisterButtonShaperChangeListener(ButtonShaperChangeListener)
,
BUTTON_SHAPER_PROPERTY
public static void unregisterButtonShaperChangeListener(ButtonShaperChangeListener buttonShaperChangeListener)
buttonShaperChangeListener
- The listener to unregister.getCurrentButtonShaper()
,
getCurrentButtonShaperName()
,
setCurrentButtonShaper(String)
,
setCurrentButtonShaper(SubstanceButtonShaper)
,
registerButtonShaperChangeListener(ButtonShaperChangeListener)
,
BUTTON_SHAPER_PROPERTY
public static void registerGradientPainterChangeListener(GradientPainterChangeListener gradientPainterChangeListener)
gradientPainterChangeListener
- New listener on gradient painter change.getCurrentGradientPainter()
,
getCurrentGradientPainterName()
,
setCurrentGradientPainter(String)
,
setCurrentGradientPainter(SubstanceGradientPainter)
,
unregisterGradientPainterChangeListener(GradientPainterChangeListener)
,
GRADIENT_PAINTER_PROPERTY
public static void unregisterGradientPainterChangeListener(GradientPainterChangeListener gradientPainterChangeListener)
gradientPainterChangeListener
- The listener to unregister.getCurrentGradientPainter()
,
getCurrentGradientPainterName()
,
setCurrentGradientPainter(String)
,
setCurrentGradientPainter(SubstanceGradientPainter)
,
registerGradientPainterChangeListener(GradientPainterChangeListener)
,
GRADIENT_PAINTER_PROPERTY
public static void registerTitlePainterChangeListener(TitlePainterChangeListener titlePainterChangeListener)
titlePainterChangeListener
- New listener on title painter change.getCurrentTitlePainter()
,
getCurrentTitlePainterName()
,
setCurrentTitlePainter(String)
,
setCurrentTitlePainter(SubstanceTitlePainter)
,
unregisterTitlePainterChangeListener(TitlePainterChangeListener)
,
TITLE_PAINTER_PROPERTY
public static void unregisterTitlePainterChangeListener(TitlePainterChangeListener titlePainterChangeListener)
titlePainterChangeListener
- The listener to unregister.getCurrentTitlePainter()
,
getCurrentTitlePainterName()
,
setCurrentTitlePainter(String)
,
setCurrentTitlePainter(SubstanceTitlePainter)
,
registerTitlePainterChangeListener(TitlePainterChangeListener)
,
TITLE_PAINTER_PROPERTY
public static void registerBorderPainterChangeListener(BorderPainterChangeListener borderPainterChangeListener)
borderPainterChangeListener
- New listener on border painter change.getCurrentBorderPainter()
,
getCurrentBorderPainterName()
,
setCurrentBorderPainter(String)
,
setCurrentBorderPainter(SubstanceBorderPainter)
,
unregisterBorderPainterChangeListener(BorderPainterChangeListener)
,
BORDER_PAINTER_PROPERTY
public static void unregisterBorderPainterChangeListener(BorderPainterChangeListener borderPainterChangeListener)
borderPainterChangeListener
- The listener to unregister.getCurrentBorderPainter()
,
getCurrentBorderPainterName()
,
setCurrentBorderPainter(String)
,
setCurrentBorderPainter(SubstanceBorderPainter)
,
registerBorderPainterChangeListener(BorderPainterChangeListener)
,
BORDER_PAINTER_PROPERTY
public static void registerTabCloseChangeListener(BaseTabCloseListener tabCloseListener)
tabCloseListener
- Listener to register.registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)
,
unregisterTabCloseChangeListener(BaseTabCloseListener)
,
unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)
public static void registerTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane, BaseTabCloseListener tabCloseListener)
tabbedPane
- Tabbed pane. If null
, the tab close listener
is registered globally (for all tabbed panes).tabCloseListener
- Listener to register.registerTabCloseChangeListener(BaseTabCloseListener)
,
unregisterTabCloseChangeListener(BaseTabCloseListener)
,
unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)
public static void unregisterTabCloseChangeListener(BaseTabCloseListener tabCloseListener)
tabCloseListener
- Listener to unregister.registerTabCloseChangeListener(BaseTabCloseListener)
,
registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)
,
unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)
public static void unregisterTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane, BaseTabCloseListener tabCloseListener)
tabbedPane
- Tabbed pane. If null
, the tab close listener
is unregistered globally (for all tabbed panes).tabCloseListener
- Listener to unregister.registerTabCloseChangeListener(BaseTabCloseListener)
,
registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)
,
unregisterTabCloseChangeListener(BaseTabCloseListener)
public static java.util.Set<BaseTabCloseListener> getAllTabCloseListeners()
public static java.util.Set<BaseTabCloseListener> getAllTabCloseListeners(javax.swing.JTabbedPane tabbedPane)
tabbedPane
- A tabbed pane. If null
, all globally
registered tab close listeners are returned.
public static void registerLocaleChangeListener(LocaleChangeListener localeListener)
localeListener
- New listener on locale change.public static void unregisterLocaleChangeListener(LocaleChangeListener localeListener)
localeListener
- The listener to unregister.public static java.util.Set<LocaleChangeListener> getLocaleListeners()
public static boolean toShowExtraElements()
true
if extra UI elements (such as menu items in
system menu or menu search panel) should be shown,
false
otherwise.public static boolean toEnableInvertedThemes()
true
if inverted themes should be enabled,
false
otherwise.public static boolean toEnableNegatedThemes()
true
if negated themes should be enabled,
false
otherwise.public static boolean toBleedWatermark()
true
if the watermark should "bleed" through list,
table and tree renderers (where possible), false
otherwise.public static boolean isDebugUiMode()
true
if the application is in debug UI mode,
false
otherwise.public static ParamReader getParamReader()
public static void hideMenuSearchPanels()
showMenuSearchPanels()
public static void showMenuSearchPanels()
hideMenuSearchPanels()
public static void ignoreAnimationsOnClass(java.lang.Class<?> componentClazz)
componentClazz
- Component class.public static void ignoreAnimationsOnClass(java.lang.String componentClazzName)
componentClazzName
- Component class name.public static boolean toIgnoreAnimation(java.lang.Class<?> componentClazz)
componentClazz
- Component class.
true
if animations should be ignored on instances
of the specified class, false
otherwise.public static void permanentlyShowHeapStatusPanel(javax.swing.JRootPane pane)
JFrame.setDefaultLookAndFeelDecorated(boolean)
with
true
or -Dsubstancelaf.useDecorations VM flag to run your
app in custom decoration mode.
pane
- The root pane.
java.lang.IllegalArgumentException
- if the heap status panel functionality is not available (was
not enabled).permanentlyHideHeapStatusPanel(JRootPane)
,
HEAP_STATUS_PANEL
public static void permanentlyHideHeapStatusPanel(javax.swing.JRootPane pane)
pane
- The root pane.
java.lang.IllegalArgumentException
- if the heap status panel functionality is not available (was
not enabled).permanentlyShowHeapStatusPanel(JRootPane)
,
HEAP_STATUS_PANEL
public static void setImageWatermarkKind(SubstanceConstants.ImageWatermarkKind kind)
kind
- New value for the global kind for image-based watermarks.getImageWatermarkKind()
,
getImageWatermarkOpacity()
,
setImageWatermarkOpacity(float)
,
WATERMARK_IMAGE_KIND
,
WATERMARK_IMAGE_OPACITY
,
WATERMARK_IMAGE_PROPERTY
public static SubstanceConstants.ImageWatermarkKind getImageWatermarkKind()
getImageWatermarkOpacity()
,
#setImageWatermarkKind(ImageWatermarkKind)
,
setImageWatermarkOpacity(float)
,
WATERMARK_IMAGE_KIND
,
WATERMARK_IMAGE_OPACITY
,
WATERMARK_IMAGE_PROPERTY
public static void setImageWatermarkOpacity(float opacity)
opacity
- New value for the global opacity for image-based watermarks.
Should be in 0.0-1.0 range.
java.lang.IllegalArgumentException
- If the value is not in 0.0-1.0 range.getImageWatermarkKind()
,
getImageWatermarkOpacity()
,
#setImageWatermarkKind(ImageWatermarkKind)
,
WATERMARK_IMAGE_KIND
,
WATERMARK_IMAGE_OPACITY
,
WATERMARK_IMAGE_PROPERTY
public static float getImageWatermarkOpacity()
getImageWatermarkKind()
,
#setImageWatermarkKind(ImageWatermarkKind)
,
setImageWatermarkOpacity(float)
,
WATERMARK_IMAGE_KIND
,
WATERMARK_IMAGE_OPACITY
,
WATERMARK_IMAGE_PROPERTY
public static void addMixedTheme(SubstanceMixTheme mixedTheme)
mixed
theme.
mixedTheme
- A mixed
theme to register.addMixedTheme(SubstanceTheme...)
,
addMixedThemeBy(SubstanceTheme)
,
hasMixedThemes()
,
removeMixedTheme(SubstanceMixTheme)
,
removeMixedThemeBy(SubstanceTheme)
public static void addMixedTheme(SubstanceTheme... themes)
mixed
theme.
themes
- The base themes for the new mixed
theme.addMixedTheme(SubstanceMixTheme)
,
addMixedThemeBy(SubstanceTheme)
,
hasMixedThemes()
,
removeMixedTheme(SubstanceMixTheme)
,
removeMixedThemeBy(SubstanceTheme)
public static void addMixedThemeBy(SubstanceTheme mainTheme)
mixed
themes such as:
mixed
theme.
mainTheme
- The main theme for the new mixed
themes.addMixedTheme(SubstanceMixTheme)
,
addMixedTheme(SubstanceTheme...)
,
hasMixedThemes()
,
removeMixedTheme(SubstanceMixTheme)
,
removeMixedThemeBy(SubstanceTheme)
public static void removeMixedTheme(SubstanceMixTheme mixedTheme)
mixed
theme.
mixedTheme
- The mixed
theme to unregister.addMixedTheme(SubstanceMixTheme)
,
addMixedTheme(SubstanceTheme...)
,
addMixedThemeBy(SubstanceTheme)
,
hasMixedThemes()
,
removeMixedThemeBy(SubstanceTheme)
public static void removeMixedThemeBy(SubstanceTheme mainTheme)
mixed
themes such
that the specified theme is the main theme.
mainTheme
- The main theme for the mixed
themes to be
unregistered.addMixedTheme(SubstanceMixTheme)
,
addMixedTheme(SubstanceTheme...)
,
addMixedThemeBy(SubstanceTheme)
,
hasMixedThemes()
,
removeMixedTheme(SubstanceMixTheme)
public static boolean hasMixedThemes()
mixed
themes registered
globally.
true
if there is at least one mixed
theme registered globally, false
otherwise.addMixedTheme(SubstanceMixTheme)
,
addMixedTheme(SubstanceTheme...)
,
addMixedThemeBy(SubstanceTheme)
,
removeMixedTheme(SubstanceMixTheme)
,
removeMixedThemeBy(SubstanceTheme)
public static boolean isToUseConstantThemesOnDialogs()
JOptionPane
s created with predefined
message types should use constant themes for the icons.
true
if the JOptionPane
s created
with predefined message types should use constant themes for the
icons, false
otherwise.setToUseConstantThemesOnDialogs(boolean)
public static void setToUseConstantThemesOnDialogs(boolean toUseConstantThemesOnDialogs)
JOptionPane
s
created with predefined message types.
toUseConstantThemesOnDialogs
- if true
, the JOptionPane
s
created with predefined message types should use constant
themes for the icons.isToUseConstantThemesOnDialogs()
public static boolean setSkin(SubstanceSkin skin)
skin
- Skin to set.
true
if the specified skin has been set
successfully, false
otherwise.setSkin(SubstanceSkin)
,
registerSkinChangeListener(SkinChangeListener)
,
unregisterSkinChangeListener(SkinChangeListener)
public static boolean setSkin(java.lang.String skinClassName)
skinClassName
- Skin to set.
true
if the specified skin has been set
successfully, false
otherwise.setSkin(SubstanceSkin)
,
registerSkinChangeListener(SkinChangeListener)
,
unregisterSkinChangeListener(SkinChangeListener)
public static java.util.Map<java.lang.String,SkinInfo> getAllSkins()
public boolean getSupportsWindowDecorations()
getSupportsWindowDecorations
in class javax.swing.LookAndFeel
public static void setLabelBundleClassLoader(java.lang.ClassLoader labelBundleClassLoader)
LABEL_BUNDLE
.
labelBundleClassLoader
- Class loader for LABEL_BUNDLE
.public static javax.swing.JComponent getTitlePaneComponent(java.awt.Window window)
window
- Top-level window.
JFrame
or JDialog
and
has custom decorations, the result is the title pane,
null
otherwise.public static void setBackgroundComposite(java.lang.Class<?> clazz, ControlBackgroundComposite composite)
BACKGROUND_COMPOSITE
client property.
clazz
- Component class.composite
- Default background composite for controls of the specified
class.public static ControlBackgroundComposite getBackgroundComposite(java.awt.Component component)
component
- Component.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |