Class RadianceImageCreator
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.utils.RadianceImageCreator
-
public final class RadianceImageCreator extends java.lang.ObjectProvides 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[]crayonColorsCrayon colors.
-
Constructor Summary
Constructors Constructor Description RadianceImageCreator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static intcrayonX(int i)Retrieves crayon X offset.private static intcrayonY(int i)Retrieves crayon Y offset.static javax.swing.IcongetCapsLockIcon(ContainerColorTokens tokens, java.awt.Component c)Returns a caps lock icon that matches the specified tokens.static java.awt.image.BufferedImagegetColorImage(java.awt.Component comp, javax.swing.Icon original, java.awt.Color color, float alpha)static java.awt.image.BufferedImagegetContainerTokensImage(java.awt.Component comp, javax.swing.Icon original, ContainerColorTokens colorTokens, float originalBrightnessFactor)Creates a new version of the specified icon that is rendered in the colors of the specified color tokens.static java.awt.image.BufferedImagegetContainerTokensImage(java.awt.image.BufferedImage original, ContainerColorTokens colorTokens, float originalBrightnessFactor, float alpha)Creates a new version of the specified image that is rendered in the colors of the specified color tokens.static java.awt.ImagegetCrayonsImage(java.awt.Color fillColor)Retrieves crayons image for the crayon panel of color chooser.private static java.awt.image.BufferedImagegetSingleCrayon(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.IcongetSmallLockIcon(ContainerColorTokens tokens, java.awt.Component c)Returns a lock icon that matches the specified tokens.
-
-
-
Method Detail
-
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(ContainerColorTokens tokens, java.awt.Component c)
Returns a lock icon that matches the specified tokens.- Parameters:
tokens- Tokens.- Returns:
- Lock icon that matches the specified tokens.
-
getCapsLockIcon
public static javax.swing.Icon getCapsLockIcon(ContainerColorTokens tokens, java.awt.Component c)
Returns a caps lock icon that matches the specified tokens.- Parameters:
tokens- Tokens.- Returns:
- Caps lock icon that matches the specified tokens.
-
getContainerTokensImage
public static java.awt.image.BufferedImage getContainerTokensImage(java.awt.Component comp, javax.swing.Icon original, ContainerColorTokens colorTokens, float originalBrightnessFactor)Creates a new version of the specified icon that is rendered in the colors of the specified color tokens.- Parameters:
comp- Component.original- The original icon.colorTokens- Color tokens.- Returns:
- Tokens-based version of the original icon.
-
getContainerTokensImage
public static java.awt.image.BufferedImage getContainerTokensImage(java.awt.image.BufferedImage original, ContainerColorTokens colorTokens, float originalBrightnessFactor, float alpha)Creates a new version of the specified image that is rendered in the colors of the specified color tokens.- Parameters:
original- The original image.colorTokens- Color tokens.originalBrightnessFactor- The original brightness factor.- Returns:
- Tokens-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)
-
-