be.lassi.domain
Class NamedColor
java.lang.Object
be.lassi.domain.NamedColor
public final class NamedColor
- extends java.lang.Object
Color with a name, and a collection of predefined colors.
Method Summary |
static NamedColor |
get(java.lang.String name)
Gets the color with given name. |
java.awt.Color |
getColor()
Gets the actual color. |
static java.awt.Color |
getColor(java.lang.String name)
|
static NamedColor |
getDefault()
Gets the default color. |
java.lang.String |
getName()
Gets the color name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ALL
public static final NamedColor[] ALL
- All predefined colors.
get
public static NamedColor get(java.lang.String name)
- Gets the color with given name.
- Parameters:
name
- the color name
- Returns:
- the color
getColor
public java.awt.Color getColor()
- Gets the actual color.
- Returns:
- the actual color
getColor
public static java.awt.Color getColor(java.lang.String name)
getDefault
public static NamedColor getDefault()
- Gets the default color.
- Returns:
- the default color
getName
public java.lang.String getName()
- Gets the color name.
- Returns:
- the color name