|
iRex DR1000 Manager v0.5.1 | ||||||||
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 contains a default color to be used in the strokes and an
method
to safely initialize the color. When the
class is first loaded, the default 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
Default color to use in 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 do
not begin with '#'.
s
- a string color code
Color.decode(String)
|
iRex DR1000 Manager v0.5.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |