public static final class SubstanceCortex.ComponentScope
extends java.lang.Object
Components.| Constructor | Description |
|---|---|
ComponentScope() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
allowAnimations(java.awt.Component comp,
SubstanceSlices.AnimationFacet animationFacet) |
Allows animations of the specified facet on the specified control.
|
static void |
disallowAnimations(java.awt.Component comp,
SubstanceSlices.AnimationFacet animationFacet) |
Disallows animations of the specified facet on the specified control.
|
static java.util.Set<BaseTabCloseListener> |
getAllTabCloseListeners(javax.swing.JTabbedPane tabbedPane) |
Returns all listeners registered on tab closing of the specified tabbed pane.
|
static SubstanceSkin |
getCurrentSkin(java.awt.Component c) |
Returns the current skin for the specified component.
|
static SubstanceSlices.DecorationAreaType |
getImmediateDecorationType(java.awt.Component comp) |
Returns the immediate decoration area type of the specified component.
|
static boolean |
isAnimationAllowed(java.awt.Component comp,
SubstanceSlices.AnimationFacet animationFacet) |
Checks whether the specified animation facet is allowed on the specified component.
|
static void |
registerTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
BaseTabCloseListener tabCloseListener) |
Registers the specified listener on tab-close events on the specified tabbed pane.
|
static void |
setAutomaticDragAndDropSupportPresence(javax.swing.JTree tree,
java.lang.Boolean hasAutomaticDragAndDropSupport) |
Specifies whether the tree should have automatic drag and drop support.
|
static void |
setAutomaticScrollPresence(javax.swing.JScrollPane scrollPane,
java.lang.Boolean hasAutomaticScroll) |
Specifies whether the scroll pane should have have auto-scroll support invoked on mouse
button click that triggers popups.
|
static void |
setButtonOpenSide(javax.swing.JComponent comp,
SubstanceSlices.Side openSide) |
Specifies the open side for the specific button component.
|
static void |
setButtonOpenSides(javax.swing.JComponent comp,
java.util.Set<SubstanceSlices.Side> openSides) |
Specifies the open sides for the specific button component.
|
static void |
setButtonShaper(javax.swing.JComponent comp,
SubstanceButtonShaper buttonShaper) |
Specifies the button shaper to be used for the specific component.
|
static void |
setButtonStraightSide(javax.swing.JComponent comp,
SubstanceSlices.Side straightSide) |
Specifies the straight side for the specific button component.
|
static void |
setButtonStraightSides(javax.swing.JComponent comp,
java.util.Set<SubstanceSlices.Side> straightSides) |
Specifies the straight sides for the specific button component.
|
static void |
setComboBoxPopupFlyoutOrientation(javax.swing.JComboBox comboBox,
java.lang.Integer comboPopupFlyoutOrientation) |
Specifies the combobox popup flyout orientation.
|
static void |
setComboBoxPrototypeCallback(javax.swing.JComboBox comboBox,
ComboPopupPrototypeCallback comboPopupPrototypeCallback) |
Specifies the combobox popup prototype callback which is used to compute the width of the
popup at runtime.
|
static void |
setComboBoxPrototypeDisplayValue(javax.swing.JComboBox comboBox,
java.lang.Object comboPopupPrototypeDisplayValue) |
Specifies the combobox popup prototype display value which is used to compute the width
of the popup at runtime.
|
static void |
setFlipTextSelectionOnEscape(javax.swing.text.JTextComponent comp,
java.lang.Boolean flipTextSelectionOnEscape) |
Specifies whether the text component contents should flip selection on ESCAPE key press.
|
static void |
setLockIconVisible(javax.swing.JComponent comp,
java.lang.Boolean visible) |
Specifies component-level visibility of the lock icon on the specific component.
|
static void |
setNumberOfPasswordEchoesPerCharacter(javax.swing.JPasswordField passwordField,
int echoCount) |
Specifies the number of echo characters for each password character in the specific
password field.
|
static void |
setPasswordStrengthChecker(javax.swing.JPasswordField passwordField,
PasswordStrengthChecker passwordStrengthChecker) |
Specifies password strength checker for the specific password field.
|
static void |
setRunModifiedAnimationOnTabCloseButton(javax.swing.JComponent tabComponent,
java.lang.Boolean runModifiedAnimationOnTabCloseButton) |
Specifies that only the close button of a marked-as-modified tab component should
pulsate.
|
static void |
setRunModifiedAnimationOnTabCloseButton(javax.swing.JTabbedPane tabbedPane,
java.lang.Boolean runModifiedAnimationOnTabCloseButton) |
Specifies that only the close button of a marked-as-modified tab components should
pulsate.
|
static void |
setTabCloseButtonsVisible(javax.swing.JTabbedPane tabbedPane,
java.lang.Boolean tabCloseButtonsVisible) |
Configures visibility of close buttons on all tabs in the specified tabbed pane.
|
static void |
setTabCloseButtonVisible(javax.swing.JComponent tabComponent,
java.lang.Boolean tabCloseButtonVisible) |
Configures visibility of close button on the specified tab component.
|
static void |
setTabCloseCallback(javax.swing.JComponent tabComponent,
TabCloseCallback tabCloseCallback) |
Configures the callback for deciding on the tab close type on the specified tab
component.
|
static void |
setTabCloseCallback(javax.swing.JTabbedPane tabbedPane,
TabCloseCallback tabCloseCallback) |
Configures the callback for deciding on the tab close type on all tabs in the specified
tabbed pane.
|
static void |
setTabContentPaneBorderKind(javax.swing.JTabbedPane tabbedPane,
SubstanceSlices.TabContentPaneBorderKind tabContentPaneBorderKind) |
Specifies the content pane border kind for the specified tabbed pane.
|
static void |
setTabContentsModified(javax.swing.JComponent tabComponent,
java.lang.Boolean contentsModified) |
Specifies that contents of a tab component in
JTabbedPane have been modified and
not saved. |
static void |
setTextEditContextMenuPresence(javax.swing.text.JTextComponent comp,
java.lang.Boolean hasEditContextMenu) |
Specifies whether the text component should have the edit context menu (with Cut / Copy /
Paste / ...
|
static void |
setToolbarButtonCornerRadius(javax.swing.AbstractButton button,
float toolbarButtonCornerRadius) |
Specifies corner radius for the specific button.
|
static void |
unregisterTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
BaseTabCloseListener tabCloseListener) |
Unregisters the specified listener on tab-close events on the specified tabbed
pane.
|
public static SubstanceSkin getCurrentSkin(java.awt.Component c)
null.c - Component. May be null - in this case the global current
Substance skin will be returned.SubstanceCortex.GlobalScope.getCurrentSkin()public static void registerTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
BaseTabCloseListener tabCloseListener)
tabbedPane - Tabbed pane. Must be not null.tabCloseListener - Listener to register.SubstanceCortex.GlobalScope.registerTabCloseChangeListener(BaseTabCloseListener),
unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener),
getAllTabCloseListeners(JTabbedPane)public static void unregisterTabCloseChangeListener(javax.swing.JTabbedPane tabbedPane,
BaseTabCloseListener tabCloseListener)
tabbedPane - Tabbed pane. Must be not null.tabCloseListener - Listener to unregister.SubstanceCortex.GlobalScope.unregisterTabCloseChangeListener(BaseTabCloseListener),
registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener),
getAllTabCloseListeners(JTabbedPane)public static java.util.Set<BaseTabCloseListener> getAllTabCloseListeners(javax.swing.JTabbedPane tabbedPane)
tabbedPane - A tabbed pane. Must be not null.registerTabCloseChangeListener(JTabbedPane, BaseTabCloseListener),
unregisterTabCloseChangeListener(JTabbedPane, BaseTabCloseListener)public static void allowAnimations(java.awt.Component comp,
SubstanceSlices.AnimationFacet animationFacet)
animationFacet - Animation facet to allow.comp - Control for allowing the animation facet.public static void disallowAnimations(java.awt.Component comp,
SubstanceSlices.AnimationFacet animationFacet)
animationFacet - Animation facet to disallow.comp - Control for disallowing the animation facet.public static boolean isAnimationAllowed(java.awt.Component comp,
SubstanceSlices.AnimationFacet animationFacet)
animationFacet - Animation facet.comp - Component.true if the specified animation facet is allowed on the specified
component, false otherwise.public static SubstanceSlices.DecorationAreaType getImmediateDecorationType(java.awt.Component comp)
SubstanceCortex.ComponentOrParentChainScope.setDecorationType(JComponent, SubstanceSlices.DecorationAreaType)
was not called on this component, this method returns null.comp - Component.SubstanceCortex.ComponentOrParentChainScope.setDecorationType(JComponent, SubstanceSlices.DecorationAreaType),
SubstanceCortex.ComponentOrParentChainScope.getDecorationType(Component)public static void setLockIconVisible(javax.swing.JComponent comp,
java.lang.Boolean visible)
comp - Component.visible - If true, the specific text component will show a lock icon
when it is in non-editable mode. Pass null to reset to the
default behavior.SubstanceCortex.GlobalScope.setLockIconVisible(Boolean)public static void setPasswordStrengthChecker(javax.swing.JPasswordField passwordField,
PasswordStrengthChecker passwordStrengthChecker)
passwordField - Password field.passwordStrengthChecker - Password strength checkerpublic static void setFlipTextSelectionOnEscape(javax.swing.text.JTextComponent comp,
java.lang.Boolean flipTextSelectionOnEscape)
comp - Text component.flipTextSelectionOnEscape - If true, the contents of the specified
text component will flip
selection on ESCAPE key press. Pass null
to reset to the default
behavior.public static void setTextEditContextMenuPresence(javax.swing.text.JTextComponent comp,
java.lang.Boolean hasEditContextMenu)
comp - Text component.hasEditContextMenu - If true, the text component will have the edit
context menu (with
Cut / Copy / Paste / ... menu items). Pass null
to reset to the
default behavior.SubstanceCortex.GlobalScope.setTextEditContextMenuPresence(Boolean)public static void setAutomaticDragAndDropSupportPresence(javax.swing.JTree tree,
java.lang.Boolean hasAutomaticDragAndDropSupport)
tree - Tree component.hasAutomaticDragAndDropSupport - If true, the tree will have
automatic drag and drop support. Pass
null to reset to the default behavior.SubstanceCortex.GlobalScope.setAutomaticDragAndDropSupportPresence(Boolean)public static void setAutomaticScrollPresence(javax.swing.JScrollPane scrollPane,
java.lang.Boolean hasAutomaticScroll)
scrollPane - Scroll pane component.hasAutomaticScroll - If true, the scroll pane will have have
auto-scroll support
invoked on mouse button click that triggers popups. Pass
null to
reset to the default behavior.SubstanceCortex.GlobalScope.setAutomaticScrollPresence(Boolean)public static void setButtonOpenSide(javax.swing.JComponent comp,
SubstanceSlices.Side openSide)
SubstanceButtonShaper implementations are not required to respect this call. The
default StandardButtonShaper and ClassicButtonShaper respect this call.comp - Component.openSide - Open side.setButtonOpenSides(JComponent, Set),
setButtonStraightSide(JComponent,
org.pushingpixels.substance.api.SubstanceSlices.Side)public static void setButtonOpenSides(javax.swing.JComponent comp,
java.util.Set<SubstanceSlices.Side> openSides)
SubstanceButtonShaper implementations are not required to respect this call. The
default StandardButtonShaper and ClassicButtonShaper respect this call.comp - Component.openSides - Open sides.setButtonOpenSide(JComponent, org.pushingpixels.substance.api.SubstanceSlices.Side),
setButtonStraightSides(JComponent, Set)public static void setButtonStraightSide(javax.swing.JComponent comp,
SubstanceSlices.Side straightSide)
SubstanceButtonShaper implementations are not required to respect this call. The
default StandardButtonShaper and ClassicButtonShaper respect this call.comp - Component.straightSide - Straight side.setButtonOpenSide(JComponent, org.pushingpixels.substance.api.SubstanceSlices.Side),
setButtonStraightSides(JComponent, Set)public static void setButtonStraightSides(javax.swing.JComponent comp,
java.util.Set<SubstanceSlices.Side> straightSides)
SubstanceButtonShaper implementations are not required to respect this call. The
default StandardButtonShaper and ClassicButtonShaper respect this call.comp - Component.straightSides - Straight sides.setButtonStraightSide(JComponent,
org.pushingpixels.substance.api.SubstanceSlices.Side),
setButtonOpenSides(JComponent, Set)public static void setToolbarButtonCornerRadius(javax.swing.AbstractButton button,
float toolbarButtonCornerRadius)
JToolBar.button - Button.toolbarButtonCornerRadius - Corner radius for the button when it is in a
JToolBar.SubstanceCortex.ComponentOrParentChainScope.setToolbarButtonCornerRadius(JToolBar, float),
SubstanceCortex.GlobalScope.setToolbarButtonCornerRadius(float)public static void setTabContentsModified(javax.swing.JComponent tabComponent,
java.lang.Boolean contentsModified)
Specifies that contents of a tab component in JTabbedPane have been modified and
not saved. setRunModifiedAnimationOnTabCloseButton(JComponent, Boolean),
setRunModifiedAnimationOnTabCloseButton(JTabbedPane, Boolean) and
SubstanceCortex.GlobalScope.setRunModifiedAnimationOnTabCloseButton(Boolean) APIs control whether
the entire tab or its close button area is animated.
The animation cycles between red, orange and yellow color schemes. In most cases (all but
tabs not marked with
setRunModifiedAnimationOnTabCloseButton(JComponent, Boolean),
setRunModifiedAnimationOnTabCloseButton(JTabbedPane, Boolean) and
SubstanceCortex.GlobalScope.setRunModifiedAnimationOnTabCloseButton(Boolean) APIs), the animation
will be visible only when the mouse hovers over the close button of the tab. The tooltip
of the close button is changed as well to reflect that the container contents are marked
as modified.
tabComponent - Tab component.contentsModified - If true, the close button of the matching
tab of the
matching frame / dialog will be animated.SubstanceCortex.RootPaneScope.setContentsModified(JRootPane, Boolean)public static void setTabCloseButtonsVisible(javax.swing.JTabbedPane tabbedPane,
java.lang.Boolean tabCloseButtonsVisible)
tabbedPane - Tabbed pane.tabCloseButtonsVisible - If true, all tabs in the tabbed pane will
show close buttons.setTabCloseButtonVisible(JComponent, Boolean),
SubstanceCortex.GlobalScope.setTabCloseButtonsVisible(Boolean)public static void setTabCloseButtonVisible(javax.swing.JComponent tabComponent,
java.lang.Boolean tabCloseButtonVisible)
tabComponent - Tab component.tabCloseButtonVisible - If true, the tab will show close button.setTabCloseButtonsVisible(JTabbedPane, Boolean),
SubstanceCortex.GlobalScope.setTabCloseButtonsVisible(Boolean)public static void setTabCloseCallback(javax.swing.JTabbedPane tabbedPane,
TabCloseCallback tabCloseCallback)
setTabCloseButtonVisible(JComponent, Boolean),
setTabCloseButtonsVisible(JTabbedPane, Boolean) and
SubstanceCortex.GlobalScope.setTabCloseButtonsVisible(Boolean) APIs.tabbedPane - Tabbed pane.tabCloseCallback - Callback for deciding on the tab close type on all tabs in the
tabbed pane.setTabCloseCallback(JComponent, TabCloseCallback),
SubstanceCortex.GlobalScope.setTabCloseCallback(TabCloseCallback)public static void setTabCloseCallback(javax.swing.JComponent tabComponent,
TabCloseCallback tabCloseCallback)
setTabCloseButtonVisible(JComponent, Boolean),
setTabCloseButtonsVisible(JTabbedPane, Boolean) and
SubstanceCortex.GlobalScope.setTabCloseButtonsVisible(Boolean) APIs.tabComponent - Tab component.tabCloseCallback - Callback for deciding on the tab close type on the tab component.setTabCloseCallback(JTabbedPane, TabCloseCallback),
SubstanceCortex.GlobalScope.setTabCloseCallback(TabCloseCallback)public static void setRunModifiedAnimationOnTabCloseButton(javax.swing.JTabbedPane tabbedPane,
java.lang.Boolean runModifiedAnimationOnTabCloseButton)
setTabContentsModified(JComponent, Boolean).tabbedPane - Tabbed pane.runModifiedAnimationOnTabCloseButton - If true, the
marked-as-modified animation will run only
on the
tab close button.setRunModifiedAnimationOnTabCloseButton(JComponent, Boolean),
SubstanceCortex.GlobalScope.setRunModifiedAnimationOnTabCloseButton(Boolean)public static void setRunModifiedAnimationOnTabCloseButton(javax.swing.JComponent tabComponent,
java.lang.Boolean runModifiedAnimationOnTabCloseButton)
setTabContentsModified(JComponent, Boolean).tabComponent - Tab component.runModifiedAnimationOnTabCloseButton - If true, the
marked-as-modified animation will run only
on the
tab close button.setRunModifiedAnimationOnTabCloseButton(JTabbedPane, Boolean),
SubstanceCortex.GlobalScope.setRunModifiedAnimationOnTabCloseButton(Boolean)public static void setTabContentPaneBorderKind(javax.swing.JTabbedPane tabbedPane,
SubstanceSlices.TabContentPaneBorderKind tabContentPaneBorderKind)
tabbedPane - Tabbed pane.tabContentPaneBorderKind - Content pane border kind for the specified tabbed pane.SubstanceCortex.GlobalScope.setTabContentPaneBorderKind(SubstanceSlices.TabContentPaneBorderKind)public static void setButtonShaper(javax.swing.JComponent comp,
SubstanceButtonShaper buttonShaper)
comp - Component.buttonShaper - Button shaper to be used for the component.public static void setNumberOfPasswordEchoesPerCharacter(javax.swing.JPasswordField passwordField,
int echoCount)
passwordField - Password field.echoCount - Number of echo characters for each password character in the
password field.SubstanceCortex.GlobalScope.setNumberOfPasswordEchoesPerCharacter(int)public static void setComboBoxPrototypeCallback(javax.swing.JComboBox comboBox,
ComboPopupPrototypeCallback comboPopupPrototypeCallback)
comboBox - Combobox.comboPopupPrototypeCallback - Popup prototype callback which is used to compute
the width of the popup at
runtime.setComboBoxPrototypeDisplayValue(JComboBox, Object),
SubstanceCortex.GlobalScope.setComboBoxPrototypeCallback(ComboPopupPrototypeCallback)public static void setComboBoxPrototypeDisplayValue(javax.swing.JComboBox comboBox,
java.lang.Object comboPopupPrototypeDisplayValue)
comboBox - Combobox.comboPopupPrototypeDisplayValue - Popup prototype display value which is used to
compute the width of the popup
at runtime.setComboBoxPrototypeCallback(JComboBox, ComboPopupPrototypeCallback),
SubstanceCortex.GlobalScope.setComboBoxPrototypeCallback(ComboPopupPrototypeCallback)public static void setComboBoxPopupFlyoutOrientation(javax.swing.JComboBox comboBox,
java.lang.Integer comboPopupFlyoutOrientation)
null to reset to the default flyout orientation or one of the
Integers below:
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.
comboBox - Combobox.comboPopupFlyoutOrientation - Flyout orientation for combobox popup.SubstanceCortex.GlobalScope.setComboBoxPopupFlyoutOrientation(int)