Class ColorUtility
- java.lang.Object
-
- org.pentaho.reporting.libraries.designtime.swing.ColorUtility
-
public class ColorUtility extends Object
A helper class that enables the mapping of color names and color strings given as hex-strings to be mapped into java.awt.Color objects.
-
-
Field Summary
Fields Modifier and Type Field Description static int
BRIGHTNESS_THRESHOLD
-
Constructor Summary
Constructors Constructor Description ColorUtility()
Creates a new value converter.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Color
convertToBrighter(Color c)
static Color
convertToDarker(Color c)
static Color
convertToGray(Color c, float x)
static int
getBrightness(Color color)
static Color[]
getPredefinedExcelColors()
Returns the colors that are defined in Excel.static String
toAttributeValue(Color c)
Converts the attribute to a string.static Color
toPropertyValue(String value)
Converts a string to aInteger
.
-
-
-
Field Detail
-
BRIGHTNESS_THRESHOLD
public static final int BRIGHTNESS_THRESHOLD
- See Also:
- Constant Field Values
-
-
Method Detail
-
toAttributeValue
public static String toAttributeValue(Color c)
Converts the attribute to a string.
-
toPropertyValue
public static Color toPropertyValue(String value)
Converts a string to aInteger
.- Parameters:
value
- the string.- Returns:
- a
Integer
.
-
getPredefinedExcelColors
public static Color[] getPredefinedExcelColors()
Returns the colors that are defined in Excel.- Returns:
- the excel standard colors.
-
getBrightness
public static int getBrightness(Color color)
-
-