|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.ui.Color
public class Color
Wraps an (A)RGB color and can also contain dynamic references like Display.COLOR_BACKGROUND.
For compatibility with MIDP 1.0 devices, the color class also defines COLOR_BACKGROUND etc with the very same values.
Copyright Enough Software 2006 - 2008
history
06-Jun-2006 - rob creation
| Field Summary | |
|---|---|
static int |
COLOR_BACKGROUND
A color specifier for use with getColor. |
static int |
COLOR_BORDER
A color specifier for use with getColor. |
static int |
COLOR_FOREGROUND
A color specifier for use with getColor. |
static int |
COLOR_HIGHLIGHTED_BACKGROUND
A color specifier for use with getColor. |
static int |
COLOR_HIGHLIGHTED_BORDER
A color specifier for use with getColor. |
static int |
COLOR_HIGHLIGHTED_FOREGROUND
A color specifier for use with getColor. |
static int |
TRANSPARENT
A color that defines transparent together with the dynamic flag. |
| Constructor Summary | |
|---|---|
Color(int argb)
Creates a new color |
|
Color(int argb,
boolean isDynamic)
Creates a new color |
|
| Method Summary | |
|---|---|
int |
getColor()
Retrieves the actual (A)RGB color value. |
java.lang.Integer |
getInteger()
Retrieves the integer representation of this color. |
boolean |
isDynamic()
Determines whether this color is a dynamic one like Display.COLOR_BACKGROUND |
boolean |
isTransparent()
Determines whether this color represents transparent. |
java.lang.String |
toString()
Retrieves a string representation of this color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int TRANSPARENT
public static final int COLOR_BACKGROUND
getColor.
COLOR_BACKGROUND specifies the background color of
the screen.
The background color will always contrast with the foreground color.
COLOR_BACKGROUND has the value 0.
public static final int COLOR_FOREGROUND
getColor.
COLOR_FOREGROUND specifies the foreground color,
for text characters
and simple graphics on the screen. Static text or user-editable
text should be drawn with the foreground color. The foreground color
will always constrast with background color.
COLOR_FOREGROUND has the value 1.
public static final int COLOR_HIGHLIGHTED_BACKGROUND
getColor.
COLOR_HIGHLIGHTED_BACKGROUND identifies the color for the
focus, or focus highlight, when it is drawn as a
filled in rectangle. The highlighted
background will always constrast with the highlighted foreground.
COLOR_HIGHLIGHTED_BACKGROUND has the value 2.
public static final int COLOR_HIGHLIGHTED_FOREGROUND
getColor.
COLOR_HIGHLIGHTED_FOREGROUND identifies the color for text
characters and simple graphics when they are highlighted.
Highlighted
foreground is the color to be used to draw the highlighted text
and graphics against the highlighted background.
The highlighted foreground will always constrast with
the highlighted background.
COLOR_HIGHLIGHTED_FOREGROUND has the value 3.
public static final int COLOR_BORDER
getColor.
COLOR_BORDER identifies the color for boxes and borders
when the object is to be drawn in a
non-highlighted state. The border color is intended to be used with
the background color and will contrast with it.
The application should draw its borders using the stroke style returned
by getBorderStyle().
COLOR_BORDER has the value 4.
public static final int COLOR_HIGHLIGHTED_BORDER
getColor.
COLOR_HIGHLIGHTED_BORDER
identifies the color for boxes and borders when the object is to be
drawn in a highlighted state. The highlighted border color is intended
to be used with the background color (not the highlighted background
color) and will contrast with it. The application should draw its
borders using the stroke style returned by getBorderStyle().
COLOR_HIGHLIGHTED_BORDER has the value 5.
| Constructor Detail |
|---|
public Color(int argb)
argb - the (A)RGB value of the color
public Color(int argb,
boolean isDynamic)
argb - the (A)RGB value of the color or Display.COLOR_BACKGROUND, Display.COLOR_FOREGROUND etcisDynamic - true when this color references one of the Display color fields like Display.BACKGROUND_COLOR, Display.FOREGROUND_COLOR etcCOLOR_BACKGROUND,
COLOR_BORDER,
COLOR_FOREGROUND,
COLOR_HIGHLIGHTED_BACKGROUND,
COLOR_HIGHLIGHTED_BORDER,
COLOR_HIGHLIGHTED_FOREGROUND,
TRANSPARENT| Method Detail |
|---|
public java.lang.Integer getInteger()
java.lang.IllegalStateException - when this is a dynamic color and the StyleSheet.display variable is not yet set up.
The StyleSheet.display field is set within the startApp() method of the parent MIDlet.public int getColor()
java.lang.IllegalStateException - when this is a dynamic color and the StyleSheet.display variable is not yet set up.
The StyleSheet.display field is set within the startApp() method of the parent MIDlet.public boolean isTransparent()
public boolean isDynamic()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||