|
iRex DR1000 Manager v0.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.andynaz.irex.dr1000.util.ColorMgr
public class ColorMgr
Manage the color used for the stroke.
The color can be retrived with the getColor()
method.
This class can safely manage the color used in the strokes: it contains an
inner color to be used in the strokes and an method
to safely initialize the color. When the class is first loaded, the inner
color is set using the parameter "color" from the ConfigMgr
class
from andyLib. In this way a color is always available.
In all the methods, color codes can be specified both as a RRGGBB
or a #RRGGBB
string.
Field Summary | |
---|---|
private static Color |
_color
Color of the strokes. |
Constructor Summary | |
---|---|
private |
ColorMgr()
|
Method Summary | |
---|---|
static Color |
getColor()
Returns the color in the class. |
private static String |
normalizeColorCode(String s)
Normalize the color code. |
static void |
setColor(String colorCode)
Safely set the color. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Color _color
Constructor Detail |
---|
private ColorMgr()
Method Detail |
---|
public static void setColor(String colorCode)
colorCode
does not correspond to a valid color code, this
method does nothing.
colorCode
- numeric code of the colorpublic static Color getColor()
private static String normalizeColorCode(String s)
s
if it
does not begin with '#'.
s
- a string color code
Color.decode(String)
|
iRex DR1000 Manager v0.6 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |