Class RadianceThemingCortex.ComponentOrParentChainScope

  • Enclosing class:
    RadianceThemingCortex

    public static final class RadianceThemingCortex.ComponentOrParentChainScope
    extends java.lang.Object
    APIs in this scope apply to individual application Components or all nested child components of a container.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RadianceThemingSlices.DecorationAreaType getDecorationType​(java.awt.Component comp)
      Returns the decoration area type of the specified component.
      static void setColorizationFactor​(javax.swing.JComponent comp, double colorizationFactor)
      Specifies colorization amount applied to the background and foreground of the current color scheme and the specific control.
      static void setDecorationType​(javax.swing.JComponent comp, RadianceThemingSlices.DecorationAreaType type)
      Sets the decoration type of the specified component and all its children.
      static void setExtraWidgetsPresence​(javax.swing.JComponent comp, java.lang.Boolean extraWidgetsPresence)
      Specifies that extra UI elements (such as menu items in system menu or lock borders) can be shown in the specified component.
      static void setFocusKind​(javax.swing.JComponent comp, RadianceThemingSlices.FocusKind focusKind)
      Specifies the kind of focus indication to be used on the specified component and its nested children.
      static void setSelectTextOnFocus​(javax.swing.JComponent comp, java.lang.Boolean selectTextOnFocus)
      Specifies whether the contents of the specified text component or its nested children should be selected on focus gain.
      static void setToolbarButtonCornerRadius​(javax.swing.JToolBar toolbar, float toolbarButtonCornerRadius)
      Specifies corner radius for all buttons in the specified toolbar.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ComponentOrParentChainScope

        public ComponentOrParentChainScope()
    • Method Detail

      • setSelectTextOnFocus

        public static void setSelectTextOnFocus​(javax.swing.JComponent comp,
                                                java.lang.Boolean selectTextOnFocus)
        Specifies whether the contents of the specified text component or its nested children should be selected on focus gain.
        Parameters:
        comp - Component.
        selectTextOnFocus - If true, the contents of the specified text component or its nested children will be selected on focus gain. Pass null to reset to the default behavior.
        See Also:
        RadianceThemingCortex.GlobalScope.setSelectTextOnFocus(Boolean)
      • setExtraWidgetsPresence

        public static void setExtraWidgetsPresence​(javax.swing.JComponent comp,
                                                   java.lang.Boolean extraWidgetsPresence)
        Specifies that extra UI elements (such as menu items in system menu or lock borders) can be shown in the specified component.
        Parameters:
        comp - Component.
        extraWidgetsPresence - If true, extra UI elements (such as menu items in system menu or lock borders) can be shown in the component. Pass null to reset to the default behavior.
        See Also:
        RadianceThemingCortex.GlobalScope.setExtraWidgetsPresence(Boolean)
      • setColorizationFactor

        public static void setColorizationFactor​(javax.swing.JComponent comp,
                                                 double colorizationFactor)

        Specifies colorization amount applied to the background and foreground of the current color scheme and the specific 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 UIResource interface 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 Radiance 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 the component / container itself and all its children that do not call this method.

        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:
        comp - Component.
        colorizationFactor - Colorization factor to apply to the component and its nested children.
        See Also:
        RadianceThemingCortex.GlobalScope.setColorizationFactor(double)