| java.lang.Object org.jvnet.substance.utils.SubstanceCoreUtilities
SubstanceCoreUtilities | public class SubstanceCoreUtilities (Code) | | Various utility functions. This class is for internal use only.
author: Kirill Grouchnikov author: Romain Guy |
Method Summary | |
public static void | applyStripedBackground(JComponent component, int index, JComponent renderer) | public static BufferedImage | blendImagesHorizontal(BufferedImage imageLeft, BufferedImage imageRight, double start, double end) Blends two images along X-axis.
Parameters: imageLeft - The left image. Parameters: imageRight - The right image. Parameters: start - Relative start of the blend area (in 0.0-1.0 range). Parameters: end - Relative end of the blend area (in 0.0-1.0 range). | public static BufferedImage | blendImagesVertical(BufferedImage imageTop, BufferedImage imageBottom, double start, double end) Blends two images along Y-axis.
Parameters: imageTop - The left image. Parameters: imageBottom - The right image. Parameters: start - Relative start of the blend area (in 0.0-1.0 range). Parameters: end - Relative end of the blend area (in 0.0-1.0 range). | public static String | clipString(FontMetrics metrics, int availableWidth, String fullText) Clips string based on specified font metrics and available width (in
pixels). | public static BufferedImage | createClipImage(Shape s, int width, int height) Creates a clip image for soft-clipping. | public static BufferedImage | createCompatibleImage(BufferedImage image) Creates a compatible image (for efficient processing and drawing).
Parameters: image - The original image. | public static Icon | getActiveIcon(Icon origIcon, JComponent comp, ButtonModel model, Icon glowingIcon, boolean ignoreRolloverSetting) | public static Icon | getArrowIcon(Component comp, AbstractButton button, int orientation) Returns the arrow icon.
Parameters: comp - Component. Parameters: button - Button. Parameters: orientation - Arrow orientation. | public static Color | getBackgroundFillColor(Component component) | public static BufferedImage | getBlankImage(int width, int height) Retrieves transparent image of specified dimension.
Parameters: width - Image width. Parameters: height - Image height. | public static SubstanceBorderPainter | getBorderPainter(Component comp) Returns the border painter for the specified component.
Parameters: comp - Component. | public static SubstanceButtonShaper | getButtonShaper(Component button) Returns the button shaper of the specified button.
Parameters: button - The button. | public static ClassLoader | getClassLoaderForResources() | public static int | getCloseButtonSize(JTabbedPane tabbedPane, int tabIndex) Returns the size of the close button for a tab in the specified tabbed
pane.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. | public static double | getColorizationFactor(Component c) | public static Object | getComboPopupPrototypeDisplayValue(JComboBox combo) Returns the popup prototype display value for the specified combo box.
This value is used to compute the width of the combo popup.
Parameters: combo - Combo box. | public static TabContentPaneBorderKind | getContentBorderKind(JTabbedPane tabbedPane) Returns the content border kind of the specified tabbed pane.
Parameters: tabbedPane - Tabbed pane. | public static ControlBackgroundComposite | getControlBackgroundComposite(Component component) Returns the tab background composite of the specified tabbed pane.
Parameters: component - Tabbed pane. | public static ColorUIResource | getDefaultBackgroundColor(Class componentClass, SubstanceTheme componentTheme) | public static Icon | getDoubleArrowIcon(Component comp, AbstractButton button, int orientation) Returns the arrow icon.
Parameters: comp - Component. Parameters: button - Button. Parameters: orientation - Arrow orientation. | public static int | getEchoPerChar(JPasswordField jpf) Returns the number of echo characters per each password chanaracter.
Parameters: jpf - Password field. | public static FadeTrackerCallback | getFadeCallback(AbstractButton button, boolean toRepaintParent) Returns the fade callback for the specified button.
Parameters: button - Button. | public static FadeTrackerCallback | getFadeCallback(JComponent component, ButtonModel model, boolean toIgnoreSelection, boolean toRepaintParent, Component componentToRepaint) Returns the fade callback for the specified component.
Parameters: component - Component. Parameters: model - Model for tracking the transitions. | public static FocusKind | getFocusKind(Component component) Returns the focus ring kind of the specified component.
Parameters: component - Component. | public static Color | getForegroundColor(Component component, ComponentState state, ComponentState prevState) | public static SubstanceGradientPainter | getGradientPainter(JComponent comp) Returns the gradient painter of the specified component.
Parameters: comp - Component. | public static Container | getHeaderParent(Component c) Given a component, returns the parent for computing the
SubstanceDecorationPainter .
Parameters: c - Component. | public static String | getHierarchy(Component comp) Returns the component hierarchy.
Parameters: comp - Component. | public static void | getHierarchy(Component comp, StringBuffer buffer, int level) Computes the component hierarchy. | public static Icon | getIcon(AbstractButton b, Icon defaultIcon, Icon glowingIcon, boolean ignoreRolloverSetting) Returns the current icon for the specified button. | public static Icon | getIcon(String iconResource) Returns an icon pointed to by the specified string.
Parameters: iconResource - Resource location string. | public static Color | getInterpolatedForegroundColor(Component comp, Comparable> componentId, SubstanceTheme theme, ComponentState state, ComponentState prevState, FadeKind... kinds) Returns the foreground color for the specified component.
Parameters: comp - Component. Parameters: componentId - Optional component ID. | public static Color | getMarkColor(SubstanceTheme theme, boolean isEnabled) Returns the color of mark icons (checkbox, radio button, scrollbar
arrows, combo arrows, menu arrows etc) for the specified theme.
Parameters: theme - Theme. Parameters: isEnabled - If true , the mark should be painted in enabledstate. | public static MenuGutterFillKind | getMenuGutterFillKind() Returns the global menu gutter fill kind. | public static ColorScheme | getOptionPaneColorScheme(int messageType, ColorScheme mainScheme) Returns the color scheme for the icon of option panes with the specified
message type.
Parameters: messageType - Option pane message type. Parameters: mainScheme - Main color scheme. | public static int | getPopupFlyoutOrientation(JComboBox combobox) Returns the popup flyout orientation for the specified combobox.
Parameters: combobox - Combobox. | public static int | getPopupParentIndexOf(Component comp, Component[] popups) | public static ComponentState | getPrevComponentState(JComponent comp) Returns the previous state of the specified component.
Parameters: comp - Component. | public static ComponentState | getPrevSelComponentState(JComponent comp) Returns the previous state of the specified component.
Parameters: comp - Component. | public static ResourceBundle | getResourceBundle(JComponent jcomp) Returns the resource bundle for the specified component.
Parameters: jcomp - Component. | public static String | getSchemeId(ColorScheme colorScheme) Retruns the unique ID for the specified color scheme.
Parameters: colorScheme - Color scheme. | public static ScrollPaneButtonPolicyKind | getScrollPaneButtonsPolicyKind(JScrollBar scrollBar) Returns the scroll bar buttons kind of the specified scroll bar.
Parameters: scrollBar - Scroll bar. | public static Set<Side> | getSides(AbstractButton button, String propertyName) Returns the set of sides registered on the specified button.
Parameters: button - Button. Parameters: propertyName - Client property name for retrieving the registered sides. | public static Container | getSpecialBackgroundFillContainer(JComponent comp) | public static Color | getStripedBackground(JComponent component, int index) | public static TabCloseCallback | getTabCloseCallback(MouseEvent me, JTabbedPane tabbedPane, int tabIndex) Returns the callback to be called upon tab closing (using the tab close
button).
Parameters: me - Mouse event. Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. | public static TabTextAlignmentKind | getTabTextAlignmentKind(JTabbedPane tabPane) Returns the text alignment kind of the specified tabbed pane.
Parameters: tabPane - Tabbed pane. | public static JComponent | getTitlePane(JRootPane rootPane) Returns the title pane of the specified root pane.
Parameters: rootPane - Root pane. | public static float | getToolbarButtonCornerRadius(AbstractButton button, Insets insets) Returns the corner radius of the specified toolbar button.
Parameters: button - Toolbar button. Parameters: insets - Button insets. | public static boolean | hasCloseButton(JTabbedPane tabbedPane, int tabIndex) Checks whether the specified tab has a close button.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. | public static boolean | hasColorization(Component c) | public static boolean | hasFlatAppearance(Component comp, boolean defaultValue) Checks whether the specified component is flat.
Parameters: comp - Component. Parameters: defaultValue - The value to return if there is noSubstanceLookAndFeel.FLAT_PROPERTY defined on buttonhierarchy or UIManager. | public static boolean | hasFlatAppearance(AbstractButton button) Computes whether the specified button has flat appearance.
Parameters: button - Button. | public static boolean | hasIcon(AbstractButton button) Checks whether the specified button has associated icon.
Parameters: button - Button. | public static boolean | hasNoMinSizeProperty(AbstractButton button) Checks whether the specified button should have minimal size.
Parameters: button - Button. | public static boolean | hasOverlayProperty(Component component) Checks whether the specified component has overlay enabled.
Parameters: component - Component. | public static boolean | hasPropertySetTo(Component comp, String propertyName, boolean expectedValue, boolean checkHierarchy) Checks whether a component has the specified client property set to the
specified value.
Parameters: comp - Component. Parameters: propertyName - Client property name. Parameters: expectedValue - Expected value. Parameters: checkHierarchy - if true , the entire component hierarchy istraversed. | public static boolean | hasSubstanceBorder(JComponent c) Returns indication whether the specified component's border is a
Substance-specific border.
Parameters: c - Component. | public static boolean | hasText(AbstractButton button) Checks whether the specified button has associated text.
Parameters: button - Button. | public static boolean | isButtonNeverPainted(AbstractButton button) Checks whether the specified button never paints its background.
Parameters: button - Button. | public static boolean | isComboBoxButton(AbstractButton button) Checks and answers if the specified button is in a combo box. | public static boolean | isControlAlwaysPaintedActive(Component comp) Checks whether the specified control is always painted in currently
active color (ignoring the transition states that normally result in
default appearance).
Parameters: comp - Control. | public static boolean | isControlAlwaysPaintedActive(Component comp, boolean checkHierarchy) Checks whether the specified control is always painted in currently
active color (ignoring the transition states that normally result in
default appearance).
Parameters: comp - Control. Parameters: checkHierarchy - If true , the entire component hierarchy willbe scanned for theSubstanceLookAndFeel.PAINT_ACTIVE_PROPERTY. | public static boolean | isInternalFrameModified(JInternalFrame internalFrame) Retrieves the modified state for the specified internal
frame.
Parameters: internalFrame - The internal frame. | public static boolean | isRootPaneModified(JRootPane rootPane) Retrieves the modified state for the specified root pane.
Parameters: rootPane - The root pane. | public static boolean | isScrollBarButton(AbstractButton button) Checks and answers if the specified button is in a scroll bar. | public static boolean | isScrollButton(JComponent comp) Checks answers if the specified component is a button in a scroll
control, such as scroll bar or tabbed pane (as tab scroller). | public static boolean | isSpinnerButton(AbstractButton button) Checks and answers if the specified button is in a spinner. | public static boolean | isTabModified(Component tabComponent) Retrieves the modified state for the specified component
in a tabbed pane.
Parameters: tabComponent - The associated tab component. | public static boolean | isThemeDark(SubstanceTheme theme) Checks whether the specified theme is dark.
Parameters: theme - Theme. | public static boolean | isTitleCloseButton(AbstractButton ab) Returns indication whether the specified button is a close button on some
title pane.
Parameters: ab - Button. | public static boolean | isToolBarButton(AbstractButton button) Checks and answers if the specified button is in a toolbar. | public static void | makeNonDoubleBuffered(Component comp, Map<Component, Boolean> dbSnapshot) Makes the specified component and all its descendants non-double
buffered. | public static void | makeNonOpaque(Component comp, Map<Component, Boolean> opacitySnapshot) Makes the specified component and all its descendants non-opaque. | public static void | paintFocus(Graphics g, Component mainComp, Component focusedComp, Shape focusShape, Rectangle textRect, float maxAlphaCoef, int extraPadding) Paints the focus ring on the specified component.
Parameters: g - Graphics context. Parameters: mainComp - The main component for the focus painting. Parameters: focusedComp - The actual component that has the focus. | public static void | paintFocus(Graphics g, Component mainComp, Component focusedComp, Rectangle textRect) Paints the focus ring on the specified component.
Parameters: g - Graphics context. Parameters: mainComp - The main component for the focus painting. Parameters: focusedComp - The actual component that has the focus. | public static void | paintSeparator(Component c, Graphics2D graphics, ColorScheme colorScheme, boolean isDark, int width, int height, int orientation) Paints a separator. | public static void | paintSeparator(Component c, Graphics2D graphics, ColorScheme colorScheme, boolean isDark, int width, int height, int orientation, boolean hasShadow, int maxGradLength) Paints a separator.
Parameters: c - Component. Parameters: graphics - Graphics context. Parameters: colorScheme - Color scheme. Parameters: isDark - Indication whether the color scheme is dark. Parameters: width - Separator width. Parameters: height - Separator height. Parameters: orientation - Separator orientation. Parameters: hasShadow - If true , the separator painting will haveshadow. Parameters: maxGradLength - Specifies the maximum pixel length of "ramp" portions of theseparator. | public static void | paintSeparator(Component c, Graphics2D graphics, ColorScheme colorScheme, boolean isDark, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd) Paints a separator.
Parameters: c - Component. Parameters: graphics - Graphics context. Parameters: colorScheme - Color scheme. Parameters: isDark - Indication whether the color scheme is dark. Parameters: width - Separator width. Parameters: height - Separator height. Parameters: orientation - Separator orientation. Parameters: hasShadow - If true , the separator painting will haveshadow. Parameters: maxGradLengthStart - Specifies the maximum pixel length of the starting "ramp"portion of the separator. | public static float | paintText(AbstractButton button, Rectangle textRect, String text, int mnemonicIndex) Paints the text.
Parameters: button - Button Parameters: textRect - Text rectangle Parameters: text - Text to paint Parameters: mnemonicIndex - Mnemonic index. | public static float | paintText(JComponent component, Rectangle textRect, String text, int mnemonicIndex, ComponentState state, ComponentState prevState) | public static void | paintTextCompBackground(Graphics g, JComponent comp) | public static void | paintTextComponent(Graphics g, JTextComponent textComponent, View rootView, Rectangle visibleEditorRect) | public static void | paintTextWithDropShadow(JComponent c, Graphics g, Color foregroundColor, String text, int width, int height, int xOffset, int yOffset) Paints text with drop shadow. | public static void | resetCaches() | public static void | resetMenuBars(Component component) Resets the menu bars on the specified component. | public static void | restoreDoubleBuffered(Component comp, Map<Component, Boolean> dbSnapshot) Restores the double buffer of the specified component and all its
descendants. | public static void | restoreOpaque(Component comp, Map<Component, Boolean> opacitySnapshot) Restores the opacity of the specified component and all its descendants. | public static boolean | toAnimateCloseIconOfModifiedTab(JTabbedPane tabbedPane, int tabIndex) Checks whether the specified tab should show modified animation only on
its close button.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. | public static boolean | toBleedWatermark(Component component) Returns indication whether the watermark should "bleed" through the
specified component.
Parameters: component - Component. | public static boolean | toDrawWatermark(Component component) Returns indication whether the watermark should be drawn on the specified
component.
Parameters: component - Component. | public static boolean | toLayoutVertically(JTabbedPane tabbedPane) Checks whether the specified tab should show vertically-aligned (rotated)
components.
Parameters: tabbedPane - Tabbed pane. | public static boolean | toShowExtraElements(Component component) Checks whether the specified component has extra Substance-specific UI
elements.
Parameters: component - Component. | public static boolean | toShowIconUnrotated(JTabbedPane tabbedPane, int tabIndex) Checks whether the specified tab should show unrotated icon when the tab
itself is layed-out vertically.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. | public static void | uninstallMenu(JMenuItem menuItem) Uninstalls the specified menu item. | public static boolean | useThemedDefaultIcon(JComponent comp) Checks whether the specified component will show theme-colorized icon in
the default state.
Parameters: comp - Component. | public static void | workaroundBug6576507(Graphics graphics) Provides workaround for bug
6576507. |
DO_NOT_FILL_BACKGROUND | final public static String DO_NOT_FILL_BACKGROUND(Code) | | Client property name to mark a component as skipping the background fill
during the painting sequence that involves text painters.
|
HAS_CUSTOM_BACKGROUND_FILL | final public static String HAS_CUSTOM_BACKGROUND_FILL(Code) | | |
IS_COVERED_BY_LIGHTWEIGHT_POPUPS | final public static String IS_COVERED_BY_LIGHTWEIGHT_POPUPS(Code) | | |
blendImagesHorizontal | public static BufferedImage blendImagesHorizontal(BufferedImage imageLeft, BufferedImage imageRight, double start, double end)(Code) | | Blends two images along X-axis.
Parameters: imageLeft - The left image. Parameters: imageRight - The right image. Parameters: start - Relative start of the blend area (in 0.0-1.0 range). Parameters: end - Relative end of the blend area (in 0.0-1.0 range). Blended image. |
blendImagesVertical | public static BufferedImage blendImagesVertical(BufferedImage imageTop, BufferedImage imageBottom, double start, double end)(Code) | | Blends two images along Y-axis.
Parameters: imageTop - The left image. Parameters: imageBottom - The right image. Parameters: start - Relative start of the blend area (in 0.0-1.0 range). Parameters: end - Relative end of the blend area (in 0.0-1.0 range). Blended image. |
clipString | public static String clipString(FontMetrics metrics, int availableWidth, String fullText)(Code) | | Clips string based on specified font metrics and available width (in
pixels). Returns the clipped string, which contains the beginning and the
end of the input string separated by ellipses (...) in case the string is
too long to fit into the specified width, and the origianl string
otherwise.
Parameters: metrics - Font metrics. Parameters: availableWidth - Available width in pixels. Parameters: fullText - String to clip. The clipped string, which contains the beginning and the end ofthe input string separated by ellipses (...) in case the stringis too long to fit into the specified width, and the origianlstring otherwise. |
createClipImage | public static BufferedImage createClipImage(Shape s, int width, int height)(Code) | | Creates a clip image for soft-clipping. Code taken from here.
Parameters: s - Clip shape. Parameters: width - Image width. Parameters: height - Image height. Clip image. author: Chris Campbell. |
createCompatibleImage | public static BufferedImage createCompatibleImage(BufferedImage image)(Code) | | Creates a compatible image (for efficient processing and drawing).
Parameters: image - The original image. Compatible version of the original image. author: Romain Guy |
getArrowIcon | public static Icon getArrowIcon(Component comp, AbstractButton button, int orientation)(Code) | | Returns the arrow icon.
Parameters: comp - Component. Parameters: button - Button. Parameters: orientation - Arrow orientation. Arrow icon. |
getBlankImage | public static BufferedImage getBlankImage(int width, int height)(Code) | | Retrieves transparent image of specified dimension.
Parameters: width - Image width. Parameters: height - Image height. Transparent image of specified dimension. |
getBorderPainter | public static SubstanceBorderPainter getBorderPainter(Component comp)(Code) | | Returns the border painter for the specified component.
Parameters: comp - Component. Border painter for the specified component. |
getButtonShaper | public static SubstanceButtonShaper getButtonShaper(Component button)(Code) | | Returns the button shaper of the specified button.
Parameters: button - The button. The button shaper of the specified button. |
getClassLoaderForResources | public static ClassLoader getClassLoaderForResources()(Code) | | |
getCloseButtonSize | public static int getCloseButtonSize(JTabbedPane tabbedPane, int tabIndex)(Code) | | Returns the size of the close button for a tab in the specified tabbed
pane.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. The size of the close button for a tab in the specified tabbedpane. |
getColorizationFactor | public static double getColorizationFactor(Component c)(Code) | | |
getComboPopupPrototypeDisplayValue | public static Object getComboPopupPrototypeDisplayValue(JComboBox combo)(Code) | | Returns the popup prototype display value for the specified combo box.
This value is used to compute the width of the combo popup.
Parameters: combo - Combo box. The popup prototype display value for the specified combo box. |
getContentBorderKind | public static TabContentPaneBorderKind getContentBorderKind(JTabbedPane tabbedPane)(Code) | | Returns the content border kind of the specified tabbed pane.
Parameters: tabbedPane - Tabbed pane. Content border kind of the specified tabbed pane. |
getControlBackgroundComposite | public static ControlBackgroundComposite getControlBackgroundComposite(Component component)(Code) | | Returns the tab background composite of the specified tabbed pane.
Parameters: component - Tabbed pane. Tab background composite of the specified tabbed pane. |
getDoubleArrowIcon | public static Icon getDoubleArrowIcon(Component comp, AbstractButton button, int orientation)(Code) | | Returns the arrow icon.
Parameters: comp - Component. Parameters: button - Button. Parameters: orientation - Arrow orientation. Arrow icon. |
getEchoPerChar | public static int getEchoPerChar(JPasswordField jpf)(Code) | | Returns the number of echo characters per each password chanaracter.
Parameters: jpf - Password field. The number of echo characters per each password chanaracter. |
getFadeCallback | public static FadeTrackerCallback getFadeCallback(AbstractButton button, boolean toRepaintParent)(Code) | | Returns the fade callback for the specified button.
Parameters: button - Button. Fade callback for the specified button. |
getFadeCallback | public static FadeTrackerCallback getFadeCallback(JComponent component, ButtonModel model, boolean toIgnoreSelection, boolean toRepaintParent, Component componentToRepaint)(Code) | | Returns the fade callback for the specified component.
Parameters: component - Component. Parameters: model - Model for tracking the transitions. For button components,pass the AbstractButton.getModel, for othercontrols pass a dummy (synthesized) model. Parameters: toIgnoreSelection - If true , the ButtonModel.isSelectedwill not be checked. This can be used for tracking transitionson menu items that use armed state instead,when we don't want to use different rollover themes forselected and unselected checkbox and radio button menu items(to preserve consistent visual appearence of highlights). Fade callback for the specified component. |
getFocusKind | public static FocusKind getFocusKind(Component component)(Code) | | Returns the focus ring kind of the specified component.
Parameters: component - Component. The focus ring kind of the specified component. |
getGradientPainter | public static SubstanceGradientPainter getGradientPainter(JComponent comp)(Code) | | Returns the gradient painter of the specified component.
Parameters: comp - Component. The gradient painter of the specified component. |
getHierarchy | public static String getHierarchy(Component comp)(Code) | | Returns the component hierarchy.
Parameters: comp - Component. Component hierarchy string. |
getHierarchy | public static void getHierarchy(Component comp, StringBuffer buffer, int level)(Code) | | Computes the component hierarchy.
Parameters: comp - Component. Parameters: buffer - Hierarchy representation buffer. Parameters: level - Hierarchy level. |
getIcon | public static Icon getIcon(AbstractButton b, Icon defaultIcon, Icon glowingIcon, boolean ignoreRolloverSetting)(Code) | | Returns the current icon for the specified button. This method is for
internal use only.
Parameters: b - Button. Parameters: glowingIcon - The glowing icon. Parameters: ignoreRolloverSetting - If true , the rollover status of the specifiedbutton is ignored. Icon for the specified button. |
getIcon | public static Icon getIcon(String iconResource)(Code) | | Returns an icon pointed to by the specified string.
Parameters: iconResource - Resource location string. Icon. |
getInterpolatedForegroundColor | public static Color getInterpolatedForegroundColor(Component comp, Comparable> componentId, SubstanceTheme theme, ComponentState state, ComponentState prevState, FadeKind... kinds)(Code) | | Returns the foreground color for the specified component.
Parameters: comp - Component. Parameters: componentId - Optional component ID. Can be used to differentiate sub-partsof the component, such as tabs in tabbed pane, cells in listetc. Parameters: theme - Component theme. Parameters: state - Component current state. Parameters: prevState - Component previous state. Parameters: kinds - Animation kinds to consult for computing the foreground color. Foreground color. |
getMarkColor | public static Color getMarkColor(SubstanceTheme theme, boolean isEnabled)(Code) | | Returns the color of mark icons (checkbox, radio button, scrollbar
arrows, combo arrows, menu arrows etc) for the specified theme.
Parameters: theme - Theme. Parameters: isEnabled - If true , the mark should be painted in enabledstate. Color of mark icons. |
getMenuGutterFillKind | public static MenuGutterFillKind getMenuGutterFillKind()(Code) | | Returns the global menu gutter fill kind.
The global menu gutter fill kind. |
getOptionPaneColorScheme | public static ColorScheme getOptionPaneColorScheme(int messageType, ColorScheme mainScheme)(Code) | | Returns the color scheme for the icon of option panes with the specified
message type.
Parameters: messageType - Option pane message type. Parameters: mainScheme - Main color scheme. Color scheme for the icon of option panes with the specifiedmessage type. |
getPopupFlyoutOrientation | public static int getPopupFlyoutOrientation(JComboBox combobox)(Code) | | Returns the popup flyout orientation for the specified combobox.
Parameters: combobox - Combobox. The popup flyout orientation for the specified combobox. |
getPrevComponentState | public static ComponentState getPrevComponentState(JComponent comp)(Code) | | Returns the previous state of the specified component.
Parameters: comp - Component. The previous state of the specified component. |
getPrevSelComponentState | public static ComponentState getPrevSelComponentState(JComponent comp)(Code) | | Returns the previous state of the specified component.
Parameters: comp - Component. The previous state of the specified component. |
getResourceBundle | public static ResourceBundle getResourceBundle(JComponent jcomp)(Code) | | Returns the resource bundle for the specified component.
Parameters: jcomp - Component. Resource bundle for the specified component. |
getSchemeId | public static String getSchemeId(ColorScheme colorScheme)(Code) | | Retruns the unique ID for the specified color scheme.
Parameters: colorScheme - Color scheme. Unique ID for the specified color scheme. |
getScrollPaneButtonsPolicyKind | public static ScrollPaneButtonPolicyKind getScrollPaneButtonsPolicyKind(JScrollBar scrollBar)(Code) | | Returns the scroll bar buttons kind of the specified scroll bar.
Parameters: scrollBar - Scroll bar. The scroll bar buttons kind of the specified scroll bar. |
getSides | public static Set<Side> getSides(AbstractButton button, String propertyName)(Code) | | Returns the set of sides registered on the specified button.
Parameters: button - Button. Parameters: propertyName - Client property name for retrieving the registered sides. Set of sides registered on the specified button. |
getTabCloseCallback | public static TabCloseCallback getTabCloseCallback(MouseEvent me, JTabbedPane tabbedPane, int tabIndex)(Code) | | Returns the callback to be called upon tab closing (using the tab close
button).
Parameters: me - Mouse event. Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. Callback to be called upon tab closing (using the tab closebutton). |
getTabTextAlignmentKind | public static TabTextAlignmentKind getTabTextAlignmentKind(JTabbedPane tabPane)(Code) | | Returns the text alignment kind of the specified tabbed pane.
Parameters: tabPane - Tabbed pane. The text alignment kind of the specified tabbed pane. |
getTitlePane | public static JComponent getTitlePane(JRootPane rootPane)(Code) | | Returns the title pane of the specified root pane.
Parameters: rootPane - Root pane. The title pane of the specified root pane. |
getToolbarButtonCornerRadius | public static float getToolbarButtonCornerRadius(AbstractButton button, Insets insets)(Code) | | Returns the corner radius of the specified toolbar button.
Parameters: button - Toolbar button. Parameters: insets - Button insets. Corner radius of the specified toolbar button. |
hasCloseButton | public static boolean hasCloseButton(JTabbedPane tabbedPane, int tabIndex)(Code) | | Checks whether the specified tab has a close button.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. true if the specified tab has a close button,false otherwise. |
hasFlatAppearance | public static boolean hasFlatAppearance(Component comp, boolean defaultValue)(Code) | | Checks whether the specified component is flat.
Parameters: comp - Component. Parameters: defaultValue - The value to return if there is noSubstanceLookAndFeel.FLAT_PROPERTY defined on buttonhierarchy or UIManager. false if the specified button is flat,true otherwise. |
hasFlatAppearance | public static boolean hasFlatAppearance(AbstractButton button)(Code) | | Computes whether the specified button has flat appearance.
Parameters: button - Button. true if the button has flat appearance,false otherwise. |
hasIcon | public static boolean hasIcon(AbstractButton button)(Code) | | Checks whether the specified button has associated icon.
Parameters: button - Button. If the button has associated icon, true isreturned, otherwise false . |
hasNoMinSizeProperty | public static boolean hasNoMinSizeProperty(AbstractButton button)(Code) | | Checks whether the specified button should have minimal size.
Parameters: button - Button. false if the specified button should have minimalsize, true otherwise. |
hasOverlayProperty | public static boolean hasOverlayProperty(Component component)(Code) | | Checks whether the specified component has overlay enabled.
Parameters: component - Component. true if the specified component has overlayenabled, false otherwise. |
hasPropertySetTo | public static boolean hasPropertySetTo(Component comp, String propertyName, boolean expectedValue, boolean checkHierarchy)(Code) | | Checks whether a component has the specified client property set to the
specified value.
Parameters: comp - Component. Parameters: propertyName - Client property name. Parameters: expectedValue - Expected value. Parameters: checkHierarchy - if true , the entire component hierarchy istraversed. true if the component has the specified clientproperty set to the specified value, false otherwise. |
hasSubstanceBorder | public static boolean hasSubstanceBorder(JComponent c)(Code) | | Returns indication whether the specified component's border is a
Substance-specific border.
Parameters: c - Component. true if the specified component's border is aSubstance-specific border, false otherwise. |
hasText | public static boolean hasText(AbstractButton button)(Code) | | Checks whether the specified button has associated text.
Parameters: button - Button. If the button has associated text, true isreturned, otherwise false . |
isButtonNeverPainted | public static boolean isButtonNeverPainted(AbstractButton button)(Code) | | Checks whether the specified button never paints its background.
Parameters: button - Button. true if the specified button never paints itsbackground, false otherwise. |
isComboBoxButton | public static boolean isComboBoxButton(AbstractButton button)(Code) | | Checks and answers if the specified button is in a combo box.
Parameters: button - the button to check true if in combo box, false otherwise |
isControlAlwaysPaintedActive | public static boolean isControlAlwaysPaintedActive(Component comp)(Code) | | Checks whether the specified control is always painted in currently
active color (ignoring the transition states that normally result in
default appearance).
Parameters: comp - Control. true if the specified control is always painted incurrently active color (ignoring the transition states thatnormally result in default appearance), false otherwise. |
isControlAlwaysPaintedActive | public static boolean isControlAlwaysPaintedActive(Component comp, boolean checkHierarchy)(Code) | | Checks whether the specified control is always painted in currently
active color (ignoring the transition states that normally result in
default appearance).
Parameters: comp - Control. Parameters: checkHierarchy - If true , the entire component hierarchy willbe scanned for theSubstanceLookAndFeel.PAINT_ACTIVE_PROPERTY. true if the specified control is always painted incurrently active color (ignoring the transition states thatnormally result in default appearance), false otherwise. |
isInternalFrameModified | public static boolean isInternalFrameModified(JInternalFrame internalFrame)(Code) | | Retrieves the modified state for the specified internal
frame.
Parameters: internalFrame - The internal frame. true if the specified internal frame is marked asmodified, false otherwise. See Also: SubstanceLookAndFeel.WINDOW_MODIFIED |
isRootPaneModified | public static boolean isRootPaneModified(JRootPane rootPane)(Code) | | Retrieves the modified state for the specified root pane.
Parameters: rootPane - The root pane. true if the specified root pane is marked asmodified, false otherwise. See Also: SubstanceLookAndFeel.WINDOW_MODIFIED |
isScrollBarButton | public static boolean isScrollBarButton(AbstractButton button)(Code) | | Checks and answers if the specified button is in a scroll bar.
Parameters: button - the button to check true if in scroll bar, false otherwise |
isScrollButton | public static boolean isScrollButton(JComponent comp)(Code) | | Checks answers if the specified component is a button in a scroll
control, such as scroll bar or tabbed pane (as tab scroller).
Parameters: comp - The component to check true if the specified component is a button in ascroll control, false otherwise |
isSpinnerButton | public static boolean isSpinnerButton(AbstractButton button)(Code) | | Checks and answers if the specified button is in a spinner.
Parameters: button - the button to check true if in spinner, false otherwise |
isTabModified | public static boolean isTabModified(Component tabComponent)(Code) | | Retrieves the modified state for the specified component
in a tabbed pane.
Parameters: tabComponent - The associated tab component. true if the specified component in a tabbed paneis marked as modified, false otherwise. See Also: SubstanceLookAndFeel.WINDOW_MODIFIED |
isThemeDark | public static boolean isThemeDark(SubstanceTheme theme)(Code) | | Checks whether the specified theme is dark.
Parameters: theme - Theme. true if the specified theme is dark,false otherwise. |
isTitleCloseButton | public static boolean isTitleCloseButton(AbstractButton ab)(Code) | | Returns indication whether the specified button is a close button on some
title pane.
Parameters: ab - Button. true if the specified button is a close button onsome title pane, false otherwise. |
isToolBarButton | public static boolean isToolBarButton(AbstractButton button)(Code) | | Checks and answers if the specified button is in a toolbar.
Parameters: button - the button to check true if in toolbar, false otherwise |
makeNonDoubleBuffered | public static void makeNonDoubleBuffered(Component comp, Map<Component, Boolean> dbSnapshot)(Code) | | Makes the specified component and all its descendants non-double
buffered.
Parameters: comp - Component. Parameters: dbSnapshot - The "snapshot" map that will contain the original doublebuffer status of the specified component and all itsdescendants. |
makeNonOpaque | public static void makeNonOpaque(Component comp, Map<Component, Boolean> opacitySnapshot)(Code) | | Makes the specified component and all its descendants non-opaque.
Parameters: comp - Component. Parameters: opacitySnapshot - The "snapshot" map that will contain the original opacitystatus of the specified component and all its descendants. |
paintFocus | public static void paintFocus(Graphics g, Component mainComp, Component focusedComp, Shape focusShape, Rectangle textRect, float maxAlphaCoef, int extraPadding)(Code) | | Paints the focus ring on the specified component.
Parameters: g - Graphics context. Parameters: mainComp - The main component for the focus painting. Parameters: focusedComp - The actual component that has the focus. For example, the maincomponent can be a JSpinner, while the focusedcomponent is a text field inside the the spinner editor. Parameters: focusShape - Focus shape. May be null - in this case, thebounds of mainComp will be used. Parameters: textRect - Text rectangle (if relevant). Parameters: maxAlphaCoef - Maximum alhpa coefficient for painting the focus. Values lowerthan 1.0 will result in a translucent focus ring (can be usedto paint a focus ring that doesn't draw too much attentionaway from the content, for example on text components). Parameters: extraPadding - Extra padding between the component bounds and the focus ringpainting. |
paintFocus | public static void paintFocus(Graphics g, Component mainComp, Component focusedComp, Rectangle textRect)(Code) | | Paints the focus ring on the specified component.
Parameters: g - Graphics context. Parameters: mainComp - The main component for the focus painting. Parameters: focusedComp - The actual component that has the focus. For example, the maincomponent can be a JSpinner, while the focusedcomponent is a text field inside the the spinner editor. Parameters: textRect - Text rectangle (if relevant). |
paintSeparator | public static void paintSeparator(Component c, Graphics2D graphics, ColorScheme colorScheme, boolean isDark, int width, int height, int orientation)(Code) | | Paints a separator.
Parameters: c - Component. Parameters: graphics - Graphics context. Parameters: colorScheme - Color scheme. Parameters: isDark - Indication whether the color scheme is dark. Parameters: width - Separator width. Parameters: height - Separator height. Parameters: orientation - Separator orientation. |
paintSeparator | public static void paintSeparator(Component c, Graphics2D graphics, ColorScheme colorScheme, boolean isDark, int width, int height, int orientation, boolean hasShadow, int maxGradLength)(Code) | | Paints a separator.
Parameters: c - Component. Parameters: graphics - Graphics context. Parameters: colorScheme - Color scheme. Parameters: isDark - Indication whether the color scheme is dark. Parameters: width - Separator width. Parameters: height - Separator height. Parameters: orientation - Separator orientation. Parameters: hasShadow - If true , the separator painting will haveshadow. Parameters: maxGradLength - Specifies the maximum pixel length of "ramp" portions of theseparator. The ramp portions are located on separator ends andallow providing a faded appearance on those ends. |
paintSeparator | public static void paintSeparator(Component c, Graphics2D graphics, ColorScheme colorScheme, boolean isDark, int width, int height, int orientation, boolean hasShadow, int maxGradLengthStart, int maxGradLengthEnd)(Code) | | Paints a separator.
Parameters: c - Component. Parameters: graphics - Graphics context. Parameters: colorScheme - Color scheme. Parameters: isDark - Indication whether the color scheme is dark. Parameters: width - Separator width. Parameters: height - Separator height. Parameters: orientation - Separator orientation. Parameters: hasShadow - If true , the separator painting will haveshadow. Parameters: maxGradLengthStart - Specifies the maximum pixel length of the starting "ramp"portion of the separator. The starting ramp portion is locatedon top / left separator end and allows providing a fadedappearance on that end. Parameters: maxGradLengthEnd - Specifies the maximum pixel length of the ending "ramp"portion of the separator. The ending ramp portion is locatedon bottom / right separator end and allows providing a fadedappearance on that end. |
paintText | public static float paintText(AbstractButton button, Rectangle textRect, String text, int mnemonicIndex)(Code) | | Paints the text.
Parameters: button - Button Parameters: textRect - Text rectangle Parameters: text - Text to paint Parameters: mnemonicIndex - Mnemonic index. Text alpha channel. |
paintTextWithDropShadow | public static void paintTextWithDropShadow(JComponent c, Graphics g, Color foregroundColor, String text, int width, int height, int xOffset, int yOffset)(Code) | | Paints text with drop shadow.
Parameters: c - Component. Parameters: g - Graphics context. Parameters: foregroundColor - Foreground color. Parameters: text - Text to paint. Parameters: width - Text rectangle width. Parameters: height - Text rectangle height. Parameters: xOffset - Text rectangle X offset. Parameters: yOffset - Text rectangle Y offset. |
resetCaches | public static void resetCaches()(Code) | | |
resetMenuBars | public static void resetMenuBars(Component component)(Code) | | Resets the menu bars on the specified component.
Parameters: component - Component. |
restoreDoubleBuffered | public static void restoreDoubleBuffered(Component comp, Map<Component, Boolean> dbSnapshot)(Code) | | Restores the double buffer of the specified component and all its
descendants.
Parameters: comp - Component. Parameters: dbSnapshot - The "snapshot" map that contains the original double bufferstatus of the specified component and all its descendants. |
restoreOpaque | public static void restoreOpaque(Component comp, Map<Component, Boolean> opacitySnapshot)(Code) | | Restores the opacity of the specified component and all its descendants.
Parameters: comp - Component. Parameters: opacitySnapshot - The "snapshot" map that contains the original opacity statusof the specified component and all its descendants. |
toAnimateCloseIconOfModifiedTab | public static boolean toAnimateCloseIconOfModifiedTab(JTabbedPane tabbedPane, int tabIndex)(Code) | | Checks whether the specified tab should show modified animation only on
its close button.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. true if the specified tab should show modifiedanimation only on its close button, false otherwise. |
toBleedWatermark | public static boolean toBleedWatermark(Component component)(Code) | | Returns indication whether the watermark should "bleed" through the
specified component.
Parameters: component - Component. true if the watermark should "bleed" through thespecified component, false otherwise. |
toDrawWatermark | public static boolean toDrawWatermark(Component component)(Code) | | Returns indication whether the watermark should be drawn on the specified
component.
Parameters: component - Component. true if the watermark should be drawn on thespecified component, false otherwise. |
toLayoutVertically | public static boolean toLayoutVertically(JTabbedPane tabbedPane)(Code) | | Checks whether the specified tab should show vertically-aligned (rotated)
components.
Parameters: tabbedPane - Tabbed pane. true if the specified tab should showvertically-aligned (rotated) components, false otherwise. |
toShowExtraElements | public static boolean toShowExtraElements(Component component)(Code) | | Checks whether the specified component has extra Substance-specific UI
elements.
Parameters: component - Component. true if the specified component has extraSubstance-specific UI elements, false otherwise. |
toShowIconUnrotated | public static boolean toShowIconUnrotated(JTabbedPane tabbedPane, int tabIndex)(Code) | | Checks whether the specified tab should show unrotated icon when the tab
itself is layed-out vertically.
Parameters: tabbedPane - Tabbed pane. Parameters: tabIndex - Tab index. true if the specified tab should show unrotatedicon when the tab itself is layed-out vertically,false otherwise. |
uninstallMenu | public static void uninstallMenu(JMenuItem menuItem)(Code) | | Uninstalls the specified menu item.
Parameters: menuItem - Menu item. |
useThemedDefaultIcon | public static boolean useThemedDefaultIcon(JComponent comp)(Code) | | Checks whether the specified component will show theme-colorized icon in
the default state.
Parameters: comp - Component. true if the specified component will showtheme-colorized icon in the default state, false otherwise. |
workaroundBug6576507 | public static void workaroundBug6576507(Graphics graphics)(Code) | | Provides workaround for bug
6576507. This is especially relevant for skins that use translucent
themes, such as
AutumnSkin and
MagmaSkin .
Parameters: graphics - Graphics context. |
|
|