|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.preprocess.css.ColorConverter
public class ColorConverter
Translates colors.
Copyright Enough Software 2004 - 2011
history
01-Mar-2004 - rob creation
| Field Summary | |
|---|---|
static Map |
COLORS
Defines the standard VGA colors. |
static Map |
DYNAMIC_COLORS
Defines dynamic colors like COLOR_BACKGROUND, COLOR_FOREGROUND, etc which can be used on MIDP/2.0 systems. |
static String |
ENVIRONMENT_KEY
the key for retrieving the color converter from the environment |
| Constructor Summary | |
|---|---|
ColorConverter()
Creates a new colors parser. |
|
| Method Summary | |
|---|---|
void |
clear()
Removes all found color definition from the internal cache. |
String |
generateColorConstructor(String value)
Generates a new de.enough.polish.ui.Color constructor for the given color value. |
boolean |
isAlphaColor(String color)
Determines whether the given color has a defined alpha channel. |
boolean |
isDynamic(String value)
Determines whether the given color is a dynamic one. |
void |
oldSetTemporaryColors(Map newColors)
Sets the temporary colors. |
String |
parseColor(String definition)
Parses the given color definition and returns the appropriate hex-definition. |
void |
setTemporaryColors(Map newColors)
Sets the temporary colors. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ENVIRONMENT_KEY
public static final Map COLORS
public static final Map DYNAMIC_COLORS
| Constructor Detail |
|---|
public ColorConverter()
| Method Detail |
|---|
public void clear()
public String parseColor(String definition)
definition - the value of the color, e.g. "black", "#00ff00", "rgb( 340, 0, 0)"
public void oldSetTemporaryColors(Map newColors)
newColors - all colors in a map.
BuildException - when one of the given colors is invalidpublic void setTemporaryColors(Map newColors)
newColors - all colors in a map.
BuildException - when one of the given colors is invalidpublic boolean isAlphaColor(String color)
color - the color as a hexadecimal value
public boolean isDynamic(String value)
value - the value, e.g. red or COLOR_BACKGROUND
public String generateColorConstructor(String value)
value - the color value like red or COLOR_FOREGROUND
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||