Class RadianceColorSchemeUtilities


  • public class RadianceColorSchemeUtilities
    extends java.lang.Object
    Utilities related to color schemes. This class is for internal use only.
    • Field Detail

      • YELLOW

        public static final RadianceColorScheme YELLOW
        Used as reference in attention-drawing animations. This field is for internal use only.
      • ORANGE

        public static final RadianceColorScheme ORANGE
        Used as reference in attention-drawing animations. This field is for internal use only.
      • GREEN

        public static final RadianceColorScheme GREEN
        Used as reference to the green color scheme. This field is for internal use only.
    • Constructor Detail

      • RadianceColorSchemeUtilities

        public RadianceColorSchemeUtilities()
    • Method Detail

      • getColorizedScheme

        private static RadianceColorScheme getColorizedScheme​(java.awt.Component component,
                                                              RadianceColorScheme scheme,
                                                              boolean isEnabled)
        Returns a colorized version of the specified color scheme.
        Parameters:
        component - Component.
        scheme - Color scheme.
        isEnabled - Indicates whether the component is enabled.
        Returns:
        Colorized version of the specified color scheme.
      • getColorizedScheme

        private static RadianceColorScheme getColorizedScheme​(java.awt.Component component,
                                                              RadianceColorScheme scheme,
                                                              java.awt.Color fgColor,
                                                              java.awt.Color bgColor,
                                                              boolean isEnabled)
        Returns a colorized version of the specified color scheme.
        Parameters:
        component - Component.
        scheme - Color scheme.
        isEnabled - Indicates whether the component is enabled.
        Returns:
        Colorized version of the specified color scheme.
      • getColorScheme

        public static RadianceColorScheme getColorScheme​(javax.swing.JTabbedPane jtp,
                                                         int tabIndex,
                                                         RadianceThemingSlices.ColorSchemeAssociationKind associationKind,
                                                         ComponentState componentState)
        Returns the color scheme of the specified tabbed pane tab.
        Parameters:
        jtp - Tabbed pane.
        tabIndex - Tab index.
        componentState - Tab component state.
        Returns:
        The color scheme of the specified tabbed pane tab.
      • getColorScheme

        public static RadianceColorScheme getColorScheme​(java.awt.Component component,
                                                         ComponentState componentState)
        Returns the color scheme of the specified component.
        Parameters:
        component - Component.
        componentState - Component state.
        Returns:
        Component color scheme.
      • getActiveColorScheme

        public static RadianceColorScheme getActiveColorScheme​(java.awt.Component component,
                                                               ComponentState componentState)
        Returns the active color scheme of the component.
        Parameters:
        component - Component.
        componentState - Component state.
        Returns:
        Component color scheme.
      • getHighlightAlpha

        public static float getHighlightAlpha​(java.awt.Component component,
                                              ComponentState componentState)
        Returns the alpha channel of the highlight color scheme of the component.
        Parameters:
        component - Component.
        componentState - Component state.
        Returns:
        Highlight color scheme alpha channel.
      • getAlpha

        public static float getAlpha​(java.awt.Component component,
                                     ComponentState componentState)
        Returns the alpha channel of the color scheme of the component.
        Parameters:
        component - Component.
        componentState - Component state.
        Returns:
        Color scheme alpha channel.
      • getLightColorScheme

        public static RadianceColorScheme getLightColorScheme​(java.lang.String name,
                                                              java.awt.Color[] colors,
                                                              java.util.Map<java.lang.String,​java.awt.Color> additionalColors)
      • getDarkColorScheme

        public static RadianceColorScheme getDarkColorScheme​(java.lang.String name,
                                                             java.awt.Color[] colors,
                                                             java.util.Map<java.lang.String,​java.awt.Color> additionalColors)
      • decodeColor

        private static java.awt.Color decodeColor​(java.lang.String value,
                                                  java.util.Map<java.lang.String,​java.awt.Color> colorMap)
      • getShiftedScheme

        public static RadianceColorScheme getShiftedScheme​(RadianceColorScheme orig,
                                                           java.awt.Color backgroundShiftColor,
                                                           double backgroundShiftFactor,
                                                           java.awt.Color foregroundShiftColor,
                                                           double foregroundShiftFactor)
        Returns a shifted color scheme. This method is for internal use only.
        Parameters:
        orig - The original color scheme.
        backgroundShiftColor - Shift color for the background color scheme colors. May be null - in this case, the background color scheme colors will not be shifted.
        backgroundShiftFactor - Shift factor for the background color scheme colors. If the shift color for the background color scheme colors is null, this value is ignored.
        foregroundShiftColor - Shift color for the foreground color scheme colors. May be null - in this case, the foreground color scheme colors will not be shifted.
        foregroundShiftFactor - Shift factor for the foreground color scheme colors. If the shift color for the foreground color scheme colors is null, this value is ignored.
        Returns:
        Shifted scheme.