Class SubstanceCortex.GlobalScope
- java.lang.Object
-
- org.pushingpixels.substance.api.SubstanceCortex.GlobalScope
-
- Enclosing class:
- SubstanceCortex
public static final class SubstanceCortex.GlobalScope extends java.lang.ObjectAPIs in this scope apply to the global state of the application.
-
-
Constructor Summary
Constructors Constructor Description GlobalScope()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidallowAnimations(SubstanceSlices.AnimationFacet animationFacet)Allows animations of the specified facet on all controls.static voidallowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?> clazz)Allows animations of the specified facet on all controls of specified class.static voidallowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?>[] clazz)Allows animations of the specified facet on all controls of specified classes.static voidconfigureTitleContentGravity(SubstanceSlices.HorizontalGravity titleTextHorizontalGravity, SubstanceSlices.HorizontalGravity titleControlButtonGroupHorizontalGravity, SubstanceSlices.TitleIconHorizontalGravity titleIconHorizontalGravity)Configures title pane content gravity for all decorated application windows.static voiddisallowAnimations(SubstanceSlices.AnimationFacet animationFacet)Disallows animations of the specified facet on all controls.static voiddisallowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?> clazz)Disallows animations of the specified facet on all controls of specified class.static voiddisallowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?>[] clazz)Disallows animations of the specified facet on all controls of specified classes.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.awt.image.BufferedImagegetBlankImage(double scaleFactor, int width, int height)static SubstanceSlices.HorizontalGravitygetButtonBarGravity()Returns the currently set button bar gravity for all containers that display grouped buttons, such asJOptionPanes, for example.static SubstanceSlices.ButtonOrdergetButtonBarOrder()Returns the currently set button order for all containers that display grouped buttons, such asJOptionPanes, for example.static SubstanceSkingetCurrentSkin()Returns the current global skin.static org.pushingpixels.neon.api.font.FontPolicygetFontPolicy()Looks up and retrieves theFontPolicyused by the Substance family.static SubstanceIconPackgetIconPack()Looks up and retrieves theSubstanceIconPackused by Substance.static java.util.ResourceBundlegetLabelBundle()Retrieves the current label bundle.static java.util.ResourceBundlegetLabelBundle(java.util.Locale locale)Retrieves the label bundle for the specified locale.static java.lang.ClassLoadergetLabelBundleClassLoader()static java.util.Set<SubstanceSlices.LocaleChangeListener>getLocaleChangeListeners()Returns all listeners registered on locale change.static floatgetMenuGutterFillAlpha()Returns the menu gutter fill alpha.static longgetTimelineDuration()static SubstanceSlices.TitleIconHorizontalGravitygetTitleIconHorizontalGravity()Returns the gravity for the icon in title panes of all decorated application windows.static SubstanceSlices.HorizontalGravitygetTitleTextHorizontalGravity()Returns the gravity for the title text in title panes of all decorated application windows.static booleanisAnimationAllowed(SubstanceSlices.AnimationFacet animationFacet)Checks whether the specified animation facet is allowed on the specified component.static voidregisterComponentPlugin(SubstanceComponentPlugin componentPlugin)Registers the specified component plugin.static voidregisterLocaleChangeListener(SubstanceSlices.LocaleChangeListener localeListener)Registers a new listener on locale change.static voidregisterSkinChangeListener(SkinChangeListener skinChangeListener)Registers a new listener on skin change.static voidregisterSkinPlugin(SubstanceSkinPlugin skinPlugin)Registers the specified skin plugin.static voidregisterTabCloseChangeListener(BaseTabCloseListener tabCloseListener)Registers the specified listener on tab-close events on all tabbed panes.static voidregisterWidget(java.lang.String widgetClassName, java.lang.Class<?> supportedClass, boolean isExact)static voidresetLabelBundle()Resets the current label bundle.static voidsetAutomaticDragAndDropSupportPresence(java.lang.Boolean hasAutomaticDragAndDropSupport)Specifies whether trees should have should have automatic drag and drop support.static voidsetAutomaticScrollPresence(java.lang.Boolean hasAutomaticScroll)Specifies whether scroll panes should have have auto-scroll support invoked on mouse button click that triggers popups.static voidsetBackgroundAppearanceStrategy(SubstanceSlices.BackgroundAppearanceStrategy backgroundAppearanceStrategy)Specifies when components should draw their background.static voidsetButtonBarGravity(SubstanceSlices.HorizontalGravity buttonBarGravity)Sets the button bar gravity for all containers that display grouped buttons, such asJOptionPanes, for example.static voidsetButtonBarOrder(SubstanceSlices.ButtonOrder buttonBarButtonOrder)Sets the button order for all containers that display grouped buttons, such asJOptionPanes, for example.static voidsetButtonIgnoreMinimumSize(java.lang.Boolean buttonIgnoreMinimumSize)Specifies whether buttons should ignore the default (minimum) dimension.static voidsetCapsLockIconVisible(java.lang.Boolean visible)Specifies global visibility of the caps lock icon on password fields.static voidsetColorizationFactor(double colorizationFactor)Specifies colorization amount applied to the background and foreground of the current color scheme and all control.static voidsetComboBoxPopupFlyoutOrientation(int comboPopupFlyoutOrientation)Specifies the combobox popup flyout orientation.static voidsetComboBoxPrototypeCallback(ComboPopupPrototypeCallback comboPopupPrototypeCallback)Specifies the combobox popup prototype callback which is used to compute the width of the popups at runtime.static voidsetComboBoxPrototypeDisplayValue(java.lang.Object comboPopupPrototypeDisplayValue)Specifies the combobox popup prototype display value which is used to compute the width of the popups at runtime.static voidsetComponentPreviewPainter(PreviewPainter previewPainter)Specifies global preview painter to be used for showing preview thumbnails.static voidsetExtraWidgetsPresence(java.lang.Boolean extraWidgetsPresence)Specifies that extra UI elements (such as menu items in system menu or lock borders) should be shown.static voidsetFocusKind(SubstanceSlices.FocusKind focusKind)Specifies the kind of focus indication to be used on application components.static voidsetFontPolicy(org.pushingpixels.neon.api.font.FontPolicy fontPolicy)Sets theFontPolicyto be used with Substance family.static voidsetIconFilterStrategies(SubstanceSlices.IconFilterStrategy activeIconFilterStrategy, SubstanceSlices.IconFilterStrategy enabledIconFilterStrategy, SubstanceSlices.IconFilterStrategy disabledIconFilterStrategy)Specifies how icons on controls such as buttons, toggle buttons, labels, tabs and menu items are themed.static voidsetIconPack(SubstanceIconPack iconPack)Sets theSubstanceIconPackto be used with Substance.static voidsetLabelBundleClassLoader(java.lang.ClassLoader labelBundleClassLoader)Sets the class loader forlabelBundle.static voidsetLockIconVisible(java.lang.Boolean visible)Specifies global visibility of the lock icon on non-editable text components.static voidsetMenuGutterFillAlpha(float menuGutterFillAlpha)Specifies the menu gutter fill alpha.static voidsetNumberOfPasswordEchoesPerCharacter(int echoCount)Specifies the number of echo characters for each password character in password fields.static voidsetRunModifiedAnimationOnTabCloseButton(java.lang.Boolean runModifiedAnimationOnTabCloseButton)Specifies that only the close button of a marked-as-modified tab component should pulsate.static voidsetSelectTextOnFocus(java.lang.Boolean selectTextOnFocus)Specifies whether the contents of text components should be selected on focus gain.static booleansetSkin(java.lang.String skinClassName)Sets the specified skin.static booleansetSkin(SubstanceSkin newSkin)Sets the specified skin.static voidsetTabCloseButtonsVisible(java.lang.Boolean tabCloseButtonsVisible)Configures visibility of close buttons on tabbed pane tabs.static voidsetTabCloseCallback(TabCloseCallback tabCloseCallback)Configures the callback for deciding on the tab close type on tabbed pane tabs.static voidsetTabContentPaneBorderKind(SubstanceSlices.TabContentPaneBorderKind tabContentPaneBorderKind)Specifies the content pane border kind for tabbed panes.static voidsetTextEditContextMenuPresence(java.lang.Boolean hasEditContextMenu)Specifies whether text components should have the edit context menu (with Cut / Copy / Paste / ...static voidsetTimelineDuration(long timelineDuration)static voidsetToolbarButtonCornerRadius(float toolbarButtonCornerRadius)Specifies corner radius for all toolbar buttons.static voidsetTraceFilename(java.lang.String traceFilename)Specifies the trace filename.static voidsetUseConstantThemesOnOptionPanes(java.lang.Boolean useConstantThemesOnOptionPanes)Sets the new setting for the icons of theJOptionPanes created with predefined message types.static voidsetUseDefaultColorChooser()static voidsetWidgetVisible(boolean visible, SubstanceSlices.SubstanceWidgetType... substanceWidgets)Sets the visibility of the specified widget kind(s).static voidunregisterLocaleChangeListener(SubstanceSlices.LocaleChangeListener localeListener)Unregisters a listener on locale change.static voidunregisterSkinChangeListener(SkinChangeListener skinChangeListener)Unregisters a listener on skin change.static voidunregisterTabCloseChangeListener(BaseTabCloseListener tabCloseListener)Unregisters the specified listener on tab-close events on all tabbed panes.
-
-
-
Method Detail
-
setSkin
public static boolean setSkin(SubstanceSkin newSkin)
Sets the specified skin. If the current look-and-feel is not Substance, this method will create a new Substance look-and-feel based on the specified skin and set it onUIManager. This method does not require Substance to be the current look-and-feel. Calling this method will callSwingUtilities.updateComponentTreeUI(Component)on all open top-level windows.- Parameters:
newSkin- Skin to set.- Returns:
trueif the specified skin has been set successfully,falseotherwise.- Throws:
java.lang.IllegalStateException- When called outside the Event Dispatch Thread.- See Also:
registerSkinChangeListener(SkinChangeListener),unregisterSkinChangeListener(SkinChangeListener),setSkin(String),SubstanceCortex.RootPaneScope.setSkin(JRootPane, SubstanceSkin),SubstanceSkin.isValid()
-
setSkin
public static boolean setSkin(java.lang.String skinClassName)
Sets the specified skin. If the current look-and-feel is not Substance, this method will create a new Substance look-and-feel based on the specified skin and set it onUIManager. This method does not require Substance to be the current look-and-feel. Calling this method will callSwingUtilities.updateComponentTreeUI(Component)on all open top-level windows.- Parameters:
skinClassName- Skin to set.- Returns:
trueif the specified skin has been set successfully,falseotherwise.- Throws:
java.lang.IllegalStateException- When called outside the Event Dispatch Thread.- See Also:
setSkin(SubstanceSkin),registerSkinChangeListener(SkinChangeListener),unregisterSkinChangeListener(SkinChangeListener),setSkin(SubstanceSkin),SubstanceCortex.RootPaneScope.setSkin(JRootPane, SubstanceSkin),SubstanceSkin.isValid()
-
getCurrentSkin
public static SubstanceSkin getCurrentSkin()
Returns the current global skin. If the current look-and-feel is not Substance, this method returnsnull.- Returns:
- Current global skin.
-
registerSkinChangeListener
public static void registerSkinChangeListener(SkinChangeListener skinChangeListener)
Registers a new listener on skin change.- Parameters:
skinChangeListener- New listener on skin change.- See Also:
setSkin(String),setSkin(SubstanceSkin),unregisterSkinChangeListener(SkinChangeListener)
-
unregisterSkinChangeListener
public static void unregisterSkinChangeListener(SkinChangeListener skinChangeListener)
Unregisters a listener on skin change.- Parameters:
skinChangeListener- The listener to unregister.- See Also:
setSkin(String),setSkin(SubstanceSkin),registerSkinChangeListener(SkinChangeListener)
-
getAllSkins
public static java.util.Map<java.lang.String,SkinInfo> getAllSkins()
Returns all available skins.- Returns:
- All available skins. Key - skin display name, value - skin information.
-
registerComponentPlugin
public static void registerComponentPlugin(SubstanceComponentPlugin componentPlugin)
Registers the specified component plugin. It is recommended to call this method before setting Substance as the look-and-feel in your application initialization sequence. If this method is called after Substance has been set, you will need to call thesetSkin(String)orsetSkin(SubstanceSkin)APIs to reinitialize the Substance skin.- Parameters:
componentPlugin- Component plugin to register.
-
registerSkinPlugin
public static void registerSkinPlugin(SubstanceSkinPlugin skinPlugin)
Registers the specified skin plugin.- Parameters:
skinPlugin- Skin plugin to register.
-
registerWidget
public static void registerWidget(java.lang.String widgetClassName, java.lang.Class<?> supportedClass, boolean isExact)
-
setFontPolicy
public static void setFontPolicy(org.pushingpixels.neon.api.font.FontPolicy fontPolicy)
Sets theFontPolicyto be used with Substance family. If the specified policy isnull, the default will be reset. This method does not require Substance to be the current look-and-feel, and will cause Substance to be set as the current application look-and-feel.- Parameters:
fontPolicy- TheFontPolicyto be used with Substance family, ornullto reset to the default- See Also:
getFontPolicy()
-
getFontPolicy
public static org.pushingpixels.neon.api.font.FontPolicy getFontPolicy()
Looks up and retrieves theFontPolicyused by the Substance family. If aFontPolicyhas been set, it'll be returned. If noFontPolicyhas been set, the default Substance font policy will be returned.- Returns:
- the
FontPolicyset for Substance, or the default Substance font policy. - See Also:
setFontPolicy(org.pushingpixels.neon.api.font.FontPolicy)
-
registerTabCloseChangeListener
public static void registerTabCloseChangeListener(BaseTabCloseListener tabCloseListener)
Registers the specified listener on tab-close events on all tabbed panes.- Parameters:
tabCloseListener- Listener to register.- See Also:
SubstanceCortex.ComponentScope.registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener),unregisterTabCloseChangeListener(BaseTabCloseListener),getAllTabCloseListeners()
-
unregisterTabCloseChangeListener
public static void unregisterTabCloseChangeListener(BaseTabCloseListener tabCloseListener)
Unregisters the specified listener on tab-close events on all tabbed panes.- Parameters:
tabCloseListener- Listener to unregister.- See Also:
SubstanceCortex.ComponentScope.unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener),registerTabCloseChangeListener(BaseTabCloseListener),getAllTabCloseListeners()
-
getAllTabCloseListeners
public static java.util.Set<BaseTabCloseListener> getAllTabCloseListeners()
Returns the set of all listeners registered on tab-close events on all tabbed panes.- Returns:
- Set of all listeners registered on tab-close events on all tabbed panes.
- See Also:
registerTabCloseChangeListener(BaseTabCloseListener),unregisterTabCloseChangeListener(BaseTabCloseListener)
-
setIconPack
public static void setIconPack(SubstanceIconPack iconPack)
Sets theSubstanceIconPackto be used with Substance.- Parameters:
iconPack- TheSubstanceIconPackto be used with Substance.- See Also:
getIconPack()
-
getIconPack
public static SubstanceIconPack getIconPack()
Looks up and retrieves theSubstanceIconPackused by Substance.- Returns:
- the
SubstanceIconPackset for Substance. - See Also:
setIconPack(SubstanceIconPack)
-
allowAnimations
public static void allowAnimations(SubstanceSlices.AnimationFacet animationFacet)
Allows animations of the specified facet on all controls. Due to performance considerations, this API can only be used to control renderer-based components (tables, lists, trees) and custom Substance animations (focus loop, icon glow, etc).- Parameters:
animationFacet- Animation facet to allow.
-
allowAnimations
public static void allowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?> clazz)
Allows animations of the specified facet on all controls of specified class. Due to performance considerations, this API can only be used to control renderer-based components (tables, lists, trees) and custom Substance animations (focus loop, icon glow, etc).- Parameters:
animationFacet- Animation facet to allow.clazz- Control class for allowing the animation facet.
-
allowAnimations
public static void allowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?>[] clazz)
Allows animations of the specified facet on all controls of specified classes. Due to performance considerations, this API can only be used to control renderer-based components (tables, lists, trees) and custom Substance animations (focus loop, icon glow, etc).- Parameters:
animationFacet- Animation facet to allow.clazz- Control classes for allowing the animation facet.
-
disallowAnimations
public static void disallowAnimations(SubstanceSlices.AnimationFacet animationFacet)
Disallows animations of the specified facet on all controls. Due to performance considerations, this API can only be used to control renderer-based components (tables, lists, trees) and custom Substance animations (focus loop, icon glow, etc).- Parameters:
animationFacet- Animation facet to disallow.
-
disallowAnimations
public static void disallowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?> clazz)
Disallows animations of the specified facet on all controls of specified class. Due to performance considerations, this API can only be used to control renderer-based components (tables, lists, trees) and custom Substance animations (focus loop, icon glow, etc).- Parameters:
animationFacet- Animation facet to disallow.clazz- Control class for disallowing the animation facet.
-
disallowAnimations
public static void disallowAnimations(SubstanceSlices.AnimationFacet animationFacet, java.lang.Class<?>[] clazz)
Disallows animations of the specified facet on all controls of specified classes. Due to performance considerations, this API can only be used to control renderer-based components (tables, lists, trees) and custom Substance animations (focus loop, icon glow, etc).- Parameters:
animationFacet- Animation facet to disallow.clazz- Control classes for disallowing the animation facet.
-
isAnimationAllowed
public static boolean isAnimationAllowed(SubstanceSlices.AnimationFacet animationFacet)
Checks whether the specified animation facet is allowed on the specified component.- Parameters:
animationFacet- Animation facet.- Returns:
trueif the specified animation facet is allowed globally,falseotherwise.
-
setTimelineDuration
public static void setTimelineDuration(long timelineDuration)
-
getTimelineDuration
public static long getTimelineDuration()
-
registerLocaleChangeListener
public static void registerLocaleChangeListener(SubstanceSlices.LocaleChangeListener localeListener)
Registers a new listener on locale change.- Parameters:
localeListener- New listener on locale change.
-
unregisterLocaleChangeListener
public static void unregisterLocaleChangeListener(SubstanceSlices.LocaleChangeListener localeListener)
Unregisters a listener on locale change.- Parameters:
localeListener- The listener to unregister.
-
getLocaleChangeListeners
public static java.util.Set<SubstanceSlices.LocaleChangeListener> getLocaleChangeListeners()
Returns all listeners registered on locale change.- Returns:
- All listeners registered on locale change.
-
getLabelBundle
public static java.util.ResourceBundle getLabelBundle()
Retrieves the current label bundle.- Returns:
- The current label bundle.
- See Also:
resetLabelBundle()
-
getLabelBundle
public static java.util.ResourceBundle getLabelBundle(java.util.Locale locale)
Retrieves the label bundle for the specified locale.- Parameters:
locale- Locale.- Returns:
- The label bundle for the specified locale.
-
resetLabelBundle
public static void resetLabelBundle()
Resets the current label bundle. Useful when the application changes Locale at runtime.- See Also:
getLabelBundle()
-
setLabelBundleClassLoader
public static void setLabelBundleClassLoader(java.lang.ClassLoader labelBundleClassLoader)
Sets the class loader forlabelBundle.- Parameters:
labelBundleClassLoader- Class loader forlabelBundle.
-
getLabelBundleClassLoader
public static java.lang.ClassLoader getLabelBundleClassLoader()
-
setUseConstantThemesOnOptionPanes
public static void setUseConstantThemesOnOptionPanes(java.lang.Boolean useConstantThemesOnOptionPanes)
Sets the new setting for the icons of theJOptionPanes created with predefined message types. The default setting istrue(use constant color scheme). To use color scheme-consistent coloring, call this method and passfalse.- Parameters:
useConstantThemesOnOptionPanes- iftrue, theJOptionPanes created with predefined message types will use constant color schemes for the icons.
-
setIconFilterStrategies
public static void setIconFilterStrategies(SubstanceSlices.IconFilterStrategy activeIconFilterStrategy, SubstanceSlices.IconFilterStrategy enabledIconFilterStrategy, SubstanceSlices.IconFilterStrategy disabledIconFilterStrategy)
Specifies how icons on controls such as buttons, toggle buttons, labels, tabs and menu items are themed.- Parameters:
activeIconFilterStrategy- Icon filter strategy for controls in active states.enabledIconFilterStrategy- Icon filter strategy for controls in enabled state.disabledIconFilterStrategy- Icon filter strategy for controls in disabled states.- See Also:
SubstanceCortex.ComponentScope.setIconFilterStrategies(JComponent, IconFilterStrategy, IconFilterStrategy, IconFilterStrategy)
-
getButtonBarOrder
public static SubstanceSlices.ButtonOrder getButtonBarOrder()
Returns the currently set button order for all containers that display grouped buttons, such asJOptionPanes, for example.- Returns:
- The currently set button order for all containers that display grouped buttons.
- See Also:
setButtonBarOrder(SubstanceSlices.ButtonOrder)
-
setButtonBarOrder
public static void setButtonBarOrder(SubstanceSlices.ButtonOrder buttonBarButtonOrder)
Sets the button order for all containers that display grouped buttons, such asJOptionPanes, for example. The default order isSubstanceSlices.ButtonOrder.PLATFORM.- Parameters:
buttonBarButtonOrder- The new button order for all containers that display grouped buttons. The value cannot benull.- See Also:
getButtonBarOrder()
-
getButtonBarGravity
public static SubstanceSlices.HorizontalGravity getButtonBarGravity()
Returns the currently set button bar gravity for all containers that display grouped buttons, such asJOptionPanes, for example.- Returns:
- The currently set button bar gravity for all containers that display grouped buttons.
- See Also:
setButtonBarGravity(SubstanceSlices.HorizontalGravity)
-
setButtonBarGravity
public static void setButtonBarGravity(SubstanceSlices.HorizontalGravity buttonBarGravity)
Sets the button bar gravity for all containers that display grouped buttons, such asJOptionPanes, for example. The default gravity isSubstanceSlices.HorizontalGravity.PLATFORM.- Parameters:
buttonBarGravity- The new button alignment for all containers that display grouped buttons. The value cannot benull.- See Also:
getButtonBarGravity()
-
configureTitleContentGravity
public static void configureTitleContentGravity(SubstanceSlices.HorizontalGravity titleTextHorizontalGravity, SubstanceSlices.HorizontalGravity titleControlButtonGroupHorizontalGravity, SubstanceSlices.TitleIconHorizontalGravity titleIconHorizontalGravity)
Configures title pane content gravity for all decorated application windows. This will only apply if you are usingJFrame.setDefaultLookAndFeelDecorated(boolean)and / orJDialog.setDefaultLookAndFeelDecorated(boolean)APIs withtrue. The default gravities areSubstanceSlices.HorizontalGravity.SWING_DEFAULTandSubstanceSlices.TitleIconHorizontalGravity.SWING_DEFAULT. Note that specific windows can have the horizontal gravity of control button group set to a different value withSubstanceCortex.WindowScope.extendContentIntoTitlePane(Window, org.pushingpixels.substance.api.SubstanceSlices.HorizontalGravity, org.pushingpixels.substance.api.SubstanceSlices.VerticalGravity)API.- Parameters:
titleTextHorizontalGravity- Horizontal gravity for the title text. The value cannot benull.titleControlButtonGroupHorizontalGravity- Horizontal gravity for the control button group. The value cannot benullorSubstanceSlices.HorizontalGravity.CENTERED.titleIconHorizontalGravity- Horizontal gravity for the icon. The value cannot benull.- See Also:
SubstanceCortex.WindowScope.extendContentIntoTitlePane(Window, org.pushingpixels.substance.api.SubstanceSlices.HorizontalGravity, org.pushingpixels.substance.api.SubstanceSlices.VerticalGravity),getTitleTextHorizontalGravity(),SubstanceCortex.WindowScope.getTitleControlButtonGroupHorizontalGravity(Window),getTitleIconHorizontalGravity(),JFrame.setDefaultLookAndFeelDecorated(boolean),JDialog.setDefaultLookAndFeelDecorated(boolean)
-
getTitleTextHorizontalGravity
public static SubstanceSlices.HorizontalGravity getTitleTextHorizontalGravity()
Returns the gravity for the title text in title panes of all decorated application windows.- Returns:
- HorizontalGravity for the title text in title panes of all decorated application windows.
- See Also:
configureTitleContentGravity(SubstanceSlices.HorizontalGravity, SubstanceSlices.HorizontalGravity, SubstanceSlices.TitleIconHorizontalGravity),SubstanceCortex.WindowScope.getTitleControlButtonGroupHorizontalGravity(Window),getTitleIconHorizontalGravity()
-
getTitleIconHorizontalGravity
public static SubstanceSlices.TitleIconHorizontalGravity getTitleIconHorizontalGravity()
Returns the gravity for the icon in title panes of all decorated application windows.- Returns:
- Horizontal gravity for the icon in title panes of all decorated application windows.
- See Also:
configureTitleContentGravity(SubstanceSlices.HorizontalGravity, SubstanceSlices.HorizontalGravity, SubstanceSlices.TitleIconHorizontalGravity),SubstanceCortex.WindowScope.getTitleControlButtonGroupHorizontalGravity(Window),getTitleIconHorizontalGravity()
-
setWidgetVisible
public static void setWidgetVisible(boolean visible, SubstanceSlices.SubstanceWidgetType... substanceWidgets)Sets the visibility of the specified widget kind(s). This call applies to all root panes. This method should not be called from inside the initialization sequence of your window. If the specific widget needs to be visible when the window is shown, wrap the call withSwingUtilities.invokeLater(Runnable).- Parameters:
visible- Visibility indication.substanceWidgets- Widget types.
-
setLockIconVisible
public static void setLockIconVisible(java.lang.Boolean visible)
Specifies global visibility of the lock icon on non-editable text components.- Parameters:
visible- Iftrue, all non-editable text components not explicitly configured withSubstanceCortex.ComponentScope.setLockIconVisible(JComponent, Boolean)will show a lock icon. Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentScope.setLockIconVisible(JComponent, Boolean),setExtraWidgetsPresence(Boolean),SubstanceCortex.ComponentOrParentChainScope.setExtraWidgetsPresence(JComponent, Boolean)
-
setCapsLockIconVisible
public static void setCapsLockIconVisible(java.lang.Boolean visible)
Specifies global visibility of the caps lock icon on password fields. Note that this functionality may not be supported on all platforms. SeeToolkit.getLockingKeyState(int)documentation for more.- Parameters:
visible- Iftrue, all password fields not explicitly configured withSubstanceCortex.ComponentScope.setCapsLockIconVisible(JPasswordField, Boolean)will show an indicator icon when they are focused and caps lock is on. Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentScope.setCapsLockIconVisible(JPasswordField, Boolean),setExtraWidgetsPresence(Boolean),SubstanceCortex.ComponentOrParentChainScope.setExtraWidgetsPresence(JComponent, Boolean)
-
setComponentPreviewPainter
public static void setComponentPreviewPainter(PreviewPainter previewPainter)
Specifies global preview painter to be used for showing preview thumbnails. Default implementation is available in theDefaultPreviewPainter.- Parameters:
previewPainter- Global preview painter. Can benull.- See Also:
SubstanceCortex.ComponentOrParentScope.setComponentPreviewPainter(JComponent, PreviewPainter)
-
setSelectTextOnFocus
public static void setSelectTextOnFocus(java.lang.Boolean selectTextOnFocus)
Specifies whether the contents of text components should be selected on focus gain.- Parameters:
selectTextOnFocus- Iftrue, the contents of text components will be selected on focus gain. Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentOrParentChainScope.setSelectTextOnFocus(JComponent, Boolean)
-
setTextEditContextMenuPresence
public static void setTextEditContextMenuPresence(java.lang.Boolean hasEditContextMenu)
Specifies whether text components should have the edit context menu (with Cut / Copy / Paste / ... menu items)- Parameters:
hasEditContextMenu- Iftrue, text components will have the edit context menu (with Cut / Copy / Paste / ... menu items). Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentScope.setTextEditContextMenuPresence(JTextComponent, Boolean)
-
setAutomaticDragAndDropSupportPresence
public static void setAutomaticDragAndDropSupportPresence(java.lang.Boolean hasAutomaticDragAndDropSupport)
Specifies whether trees should have should have automatic drag and drop support.- Parameters:
hasAutomaticDragAndDropSupport- Iftrue, trees will have automatic drag and drop support. Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentScope.setAutomaticDragAndDropSupportPresence(JTree, Boolean)
-
setAutomaticScrollPresence
public static void setAutomaticScrollPresence(java.lang.Boolean hasAutomaticScroll)
Specifies whether scroll panes should have have auto-scroll support invoked on mouse button click that triggers popups.- Parameters:
hasAutomaticScroll- Iftrue, scroll panes will have have auto-scroll support invoked on mouse button click that triggers popups. Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentScope.setAutomaticScrollPresence(JScrollPane, Boolean),setExtraWidgetsPresence(Boolean),SubstanceCortex.ComponentOrParentChainScope.setExtraWidgetsPresence(JComponent, Boolean)
-
setButtonIgnoreMinimumSize
public static void setButtonIgnoreMinimumSize(java.lang.Boolean buttonIgnoreMinimumSize)
Specifies whether buttons should ignore the default (minimum) dimension. Note thatSubstanceButtonShaperimplementations are not required to respect this call. The current implementations of the defaultPillButtonShaperandClassicButtonShaperrespect this setting.- Parameters:
buttonIgnoreMinimumSize- Iftrue, buttons will ignore the default (minimum) size under button shapers that respect this setting. Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentOrParentScope.setButtonIgnoreMinimumSize(JComponent, Boolean)
-
setBackgroundAppearanceStrategy
public static void setBackgroundAppearanceStrategy(SubstanceSlices.BackgroundAppearanceStrategy backgroundAppearanceStrategy)
Specifies when components should draw their background.- Parameters:
backgroundAppearanceStrategy- Background appearance strategy. Passnullto reset to the default behavior (toALWAYS)- See Also:
SubstanceCortex.ComponentOrParentScope.setBackgroundAppearanceStrategy(JComponent, BackgroundAppearanceStrategy)
-
setToolbarButtonCornerRadius
public static void setToolbarButtonCornerRadius(float toolbarButtonCornerRadius)
Specifies corner radius for all toolbar buttons.- Parameters:
toolbarButtonCornerRadius- Corner radius for all toolbar buttons.- See Also:
SubstanceCortex.ComponentScope.setToolbarButtonCornerRadius(AbstractButton, float),SubstanceCortex.ComponentOrParentChainScope.setToolbarButtonCornerRadius(JToolBar, float)
-
setExtraWidgetsPresence
public static void setExtraWidgetsPresence(java.lang.Boolean extraWidgetsPresence)
Specifies that extra UI elements (such as menu items in system menu or lock borders) should be shown.- Parameters:
extraWidgetsPresence- Iftrue, extra UI elements (such as menu items in system menu or lock borders) will be shown. Passnullto reset to the default behavior.- See Also:
SubstanceCortex.ComponentOrParentChainScope.setExtraWidgetsPresence(JComponent, Boolean)
-
setColorizationFactor
public static void setColorizationFactor(double colorizationFactor)
Specifies colorization amount applied to the background and foreground of the current color scheme and all control. By default, when the application does not use any custom colors, all the controls are painted with the colors of the current color scheme / skin. The colors coming from the look-and-feel implement the marker
UIResourceinterface which allows the UI delegates to differentiate between application-specific colors which are not changed, and the LAF-provide colors that are changed on LAF switch.Calling this method installs the "smart colorization" mode which uses the colors of the current color scheme and the custom background / foreground colors (when installed by application) to colorize the relevant portions of the control. For example, on checkbox the custom background color will be used to colorize the check box itself, while the custom foreground color will be applied to the check box text and the check mark.
Value of 0.0 of colorization amount results in Substance completely ignoring the custom application background and foreground colors set on the components - no colorization. Values closer to 1.0 result in almost full usage of the custom application background and foreground colors set on the components. Note that in order to maintain the gradients (fill, border, etc), even value of 1.0 does not result in full custom color being applied to the relevant visuals of the control.
Calling this method applies colorization amount to all components that do not specify a custom value with
SubstanceCortex.ComponentOrParentChainScope.setColorizationFactor(JComponent, double)calls.The default colorization amount (when this method is not called at all) is 0.5. This means that applications that install custom background / foreground colors on their UI controls will see them colorized with 50% "strength", even without calling this method.
- Parameters:
colorizationFactor- Colorization factor to apply to the component and its nested children.- See Also:
SubstanceCortex.ComponentOrParentChainScope.setColorizationFactor(JComponent, double)
-
setTabCloseButtonsVisible
public static void setTabCloseButtonsVisible(java.lang.Boolean tabCloseButtonsVisible)
Configures visibility of close buttons on tabbed pane tabs.- Parameters:
tabCloseButtonsVisible- Iftrue, tabs in tabbed panes will show close buttons.- See Also:
SubstanceCortex.ComponentScope.setTabCloseButtonVisible(JComponent, Boolean),SubstanceCortex.ComponentScope.setTabCloseButtonsVisible(JTabbedPane, Boolean)
-
setTabCloseCallback
public static void setTabCloseCallback(TabCloseCallback tabCloseCallback)
Configures the callback for deciding on the tab close type on tabbed pane tabs. Note that this is only relevant for tabs configured withSubstanceCortex.ComponentScope.setTabCloseButtonVisible(JComponent, Boolean),SubstanceCortex.ComponentScope.setTabCloseButtonsVisible(JTabbedPane, Boolean)andsetTabCloseButtonsVisible(Boolean)APIs.- Parameters:
tabCloseCallback- Callback for deciding on the tab close type on tabbed pane tabs.- See Also:
SubstanceCortex.ComponentScope.setTabCloseCallback(JComponent, TabCloseCallback),SubstanceCortex.ComponentScope.setTabCloseCallback(JTabbedPane, TabCloseCallback)
-
setRunModifiedAnimationOnTabCloseButton
public static void setRunModifiedAnimationOnTabCloseButton(java.lang.Boolean runModifiedAnimationOnTabCloseButton)
Specifies that only the close button of a marked-as-modified tab component should pulsate. By default, the animation on modified tabs is on the entire tab rectangle. Note that this is only relevant for tabs configured withSubstanceCortex.ComponentScope.setTabContentsModified(JComponent, Boolean)- Parameters:
runModifiedAnimationOnTabCloseButton- Iftrue, the marked-as-modified animation will run only on the tab close button.- See Also:
SubstanceCortex.ComponentScope.setRunModifiedAnimationOnTabCloseButton(JTabbedPane, Boolean),SubstanceCortex.ComponentScope.setRunModifiedAnimationOnTabCloseButton(JComponent, Boolean)
-
setTabContentPaneBorderKind
public static void setTabContentPaneBorderKind(SubstanceSlices.TabContentPaneBorderKind tabContentPaneBorderKind)
Specifies the content pane border kind for tabbed panes.- Parameters:
tabContentPaneBorderKind- Content pane border kind for tabbed panes.- See Also:
SubstanceCortex.ComponentScope.setTabContentPaneBorderKind(JTabbedPane, SubstanceSlices.TabContentPaneBorderKind)
-
setNumberOfPasswordEchoesPerCharacter
public static void setNumberOfPasswordEchoesPerCharacter(int echoCount)
Specifies the number of echo characters for each password character in password fields.- Parameters:
echoCount- Number of echo characters for each password character in password fields.- See Also:
SubstanceCortex.ComponentScope.setNumberOfPasswordEchoesPerCharacter(JPasswordField, int)
-
setMenuGutterFillAlpha
public static void setMenuGutterFillAlpha(float menuGutterFillAlpha)
Specifies the menu gutter fill alpha. Menu gutter is the part of the menu where checkmarks and icons are painted. The current / default menu gutter fill alpha can be obtained by callinggetMenuGutterFillAlpha().- Parameters:
menuGutterFillAlpha- Menu gutter fill alpha.- See Also:
getMenuGutterFillAlpha()
-
getMenuGutterFillAlpha
public static float getMenuGutterFillAlpha()
Returns the menu gutter fill alpha. Menu gutter is the part of the menu where checkmarks and icons are painted.- Returns:
- Menu gutter fill alpha.
- See Also:
setMenuGutterFillAlpha(float)
-
setTraceFilename
public static void setTraceFilename(java.lang.String traceFilename)
Specifies the trace filename. The trace file will contain output of the memory analyser which can be used to pinpoint the memory leaks.- Parameters:
traceFilename- Filename for tracing the memory allocations.
-
setFocusKind
public static void setFocusKind(SubstanceSlices.FocusKind focusKind)
Specifies the kind of focus indication to be used on application components.- Parameters:
focusKind- Kind of focus indication to be used on application components.- See Also:
SubstanceCortex.ComponentOrParentChainScope.setFocusKind(JComponent, SubstanceSlices.FocusKind)
-
setComboBoxPrototypeCallback
public static void setComboBoxPrototypeCallback(ComboPopupPrototypeCallback comboPopupPrototypeCallback)
Specifies the combobox popup prototype callback which is used to compute the width of the popups at runtime.- Parameters:
comboPopupPrototypeCallback- Popup prototype callback which is used to compute the width of the popups at runtime.- See Also:
SubstanceCortex.ComponentScope.setComboBoxPrototypeCallback(JComboBox, ComboPopupPrototypeCallback)
-
setComboBoxPrototypeDisplayValue
public static void setComboBoxPrototypeDisplayValue(java.lang.Object comboPopupPrototypeDisplayValue)
Specifies the combobox popup prototype display value which is used to compute the width of the popups at runtime.- Parameters:
comboPopupPrototypeDisplayValue- Popup prototype display value which is used to compute the width of the popups at runtime.- See Also:
SubstanceCortex.ComponentScope.setComboBoxPrototypeDisplayValue(JComboBox, Object),setComboBoxPrototypeCallback(ComboPopupPrototypeCallback)
-
setComboBoxPopupFlyoutOrientation
public static void setComboBoxPopupFlyoutOrientation(int comboPopupFlyoutOrientation)
Specifies the combobox popup flyout orientation. The value should be eithernullto reset to the default flyout orientation or one of theIntegers below:- The default
SwingConstants.SOUTH- the popup is displayed directly below the combobox aligned to the left. SwingConstants.NORTH- the popup is displayed directly above the combobox aligned to the left.SwingConstants.EAST- the popup is displayed to the left of the combobox aligned to the top.SwingConstants.WEST- the popup is displayed to the right of the combobox aligned to the top.SwingConstants.CENTER- the popup is displayed centered vertically over the combobox aligned to the left.
Note that the combo arrow changes in accordance with the combo popup flyout orientation.
- Parameters:
comboPopupFlyoutOrientation- Flyout orientation for combobox popups.- See Also:
SubstanceCortex.ComponentScope.setComboBoxPopupFlyoutOrientation(JComboBox, Integer)
- The default
-
getBlankImage
public static java.awt.image.BufferedImage getBlankImage(double scaleFactor, int width, int height)
-
setUseDefaultColorChooser
public static void setUseDefaultColorChooser()
-
-