Class RadianceImageCreator


  • public final class RadianceImageCreator
    extends java.lang.Object
    Provides utility functions for creating various images for Radiance look and feel. This class is for internal use only.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int[] crayonColors
      Crayon colors.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static int crayonX​(int i)
      Retrieves crayon X offset.
      private static int crayonY​(int i)
      Retrieves crayon Y offset.
      private static java.awt.AlphaComposite getAlphaComposite​(float alpha)  
      static javax.swing.Icon getCapsLockIcon​(RadianceColorScheme scheme, java.awt.Component c)
      Returns a caps lock icon that matches the specified scheme.
      static java.awt.image.BufferedImage getColorImage​(java.awt.Component comp, javax.swing.Icon original, java.awt.Color color, float alpha)  
      static java.awt.image.BufferedImage getColorSchemeImage​(java.awt.Component comp, javax.swing.Icon original, RadianceColorScheme colorScheme, float originalBrightnessFactor)
      Creates a new version of the specified icon that is rendered in the colors of the specified color scheme.
      static java.awt.image.BufferedImage getColorSchemeImage​(java.awt.image.BufferedImage original, RadianceColorScheme colorScheme, float originalBrightnessFactor, float alpha)
      Creates a new version of the specified image that is rendered in the colors of the specified color scheme.
      static java.awt.Image getCrayonsImage​(java.awt.Color fillColor)
      Retrieves crayons image for the crayon panel of color chooser.
      private static java.awt.image.BufferedImage getSingleCrayon​(double scale, java.awt.Color mainColor, int width, int height)
      Retrieves a single crayon of the specified color and dimensions for the crayon panel in color chooser.
      static javax.swing.Icon getSmallLockIcon​(RadianceColorScheme scheme, java.awt.Component c)
      Returns a lock icon that matches the specified scheme.
      static void paintSplitDividerBumpImage​(java.awt.Graphics g, RadianceSplitPaneDivider divider, int x, int y, int width, int height, boolean isHorizontal, RadianceColorScheme colorScheme)
      Paints the bump dots on the split pane dividers.
      • Methods inherited from class java.lang.Object

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

      • crayonColors

        private static final int[] crayonColors
        Crayon colors.
    • Constructor Detail

      • RadianceImageCreator

        public RadianceImageCreator()
    • Method Detail

      • getAlphaComposite

        private static java.awt.AlphaComposite getAlphaComposite​(float alpha)
      • paintSplitDividerBumpImage

        public static void paintSplitDividerBumpImage​(java.awt.Graphics g,
                                                      RadianceSplitPaneDivider divider,
                                                      int x,
                                                      int y,
                                                      int width,
                                                      int height,
                                                      boolean isHorizontal,
                                                      RadianceColorScheme colorScheme)
        Paints the bump dots on the split pane dividers.
        Parameters:
        g - Graphics context.
        divider - Split pane divider.
        x - X coordinate of the bump dots.
        y - Y coordinate of the bump dots.
        width - Width of the bump dots area.
        height - Height of the bump dots area.
        isHorizontal - Indicates whether the dots are horizontal.
        colorScheme - Color scheme.
      • getSingleCrayon

        private static java.awt.image.BufferedImage getSingleCrayon​(double scale,
                                                                    java.awt.Color mainColor,
                                                                    int width,
                                                                    int height)
        Retrieves a single crayon of the specified color and dimensions for the crayon panel in color chooser.
        Parameters:
        mainColor - Crayon main color.
        width - Crayon width.
        height - Crayon height.
        Returns:
        Crayon image.
      • crayonX

        private static int crayonX​(int i)
        Retrieves crayon X offset.
        Parameters:
        i - Crayon index.
        Returns:
        Crayon X offset.
      • crayonY

        private static int crayonY​(int i)
        Retrieves crayon Y offset.
        Parameters:
        i - Crayon index.
        Returns:
        Crayon Y offset.
      • getCrayonsImage

        public static java.awt.Image getCrayonsImage​(java.awt.Color fillColor)
        Retrieves crayons image for the crayon panel of color chooser.
        Returns:
        Crayons image.
      • getSmallLockIcon

        public static javax.swing.Icon getSmallLockIcon​(RadianceColorScheme scheme,
                                                        java.awt.Component c)
        Returns a lock icon that matches the specified scheme.
        Parameters:
        scheme - Scheme instance.
        Returns:
        Lock icon that matches the specified scheme.
      • getCapsLockIcon

        public static javax.swing.Icon getCapsLockIcon​(RadianceColorScheme scheme,
                                                       java.awt.Component c)
        Returns a caps lock icon that matches the specified scheme.
        Parameters:
        scheme - Scheme instance.
        Returns:
        Caps lock icon that matches the specified scheme.
      • getColorSchemeImage

        public static java.awt.image.BufferedImage getColorSchemeImage​(java.awt.Component comp,
                                                                       javax.swing.Icon original,
                                                                       RadianceColorScheme colorScheme,
                                                                       float originalBrightnessFactor)
        Creates a new version of the specified icon that is rendered in the colors of the specified color scheme.
        Parameters:
        comp - Component.
        original - The original icon.
        colorScheme - Color scheme.
        Returns:
        Scheme-based version of the original icon.
      • getColorSchemeImage

        public static java.awt.image.BufferedImage getColorSchemeImage​(java.awt.image.BufferedImage original,
                                                                       RadianceColorScheme colorScheme,
                                                                       float originalBrightnessFactor,
                                                                       float alpha)
        Creates a new version of the specified image that is rendered in the colors of the specified color scheme.
        Parameters:
        original - The original image.
        colorScheme - Color scheme.
        originalBrightnessFactor - The original brightness factor.
        Returns:
        Scheme-based version of the original icon.
      • getColorImage

        public static java.awt.image.BufferedImage getColorImage​(java.awt.Component comp,
                                                                 javax.swing.Icon original,
                                                                 java.awt.Color color,
                                                                 float alpha)