|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.util.ColorUtil
public class ColorUtil
This class provides utility methods to manage colors.
Field Summary | |
---|---|
static String |
REVISION
|
Constructor Summary | |
---|---|
ColorUtil()
|
Method Summary | |
---|---|
static Color |
addOffset(Color color,
int offset)
Add an offset to the given color and return the corresponding color |
static String |
addOffset(String colorStr,
int offset)
Add an offset to the given color and return an hexadecimal representation of the corresponding color |
static Color |
getColor(String colorStr)
Return a color from a given hexadecimal string (eg #FF0000 will return a pure red. |
static String |
getStringColor(Color color)
Returns the hexadecimal represention of this color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Constructor Detail |
---|
public ColorUtil()
Method Detail |
---|
public static Color getColor(String colorStr)
colorStr
- the string to be parsed
public static String getStringColor(Color color)
color
- the color to process
public static String addOffset(String colorStr, int offset)
colorStr
- the hexadecimal representation of the color (eg. "#ff0000");offset
- the offset to apply
addOffset(Color, int)
public static Color addOffset(Color color, int offset)
color
- the color to processoffset
- the offset to apply
addOffset(String, int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |