net.sf.freecol.common.resources
Class ColorResource
java.lang.Object
net.sf.freecol.common.resources.Resource
net.sf.freecol.common.resources.ColorResource
public class ColorResource
- extends Resource
A Resource wrapping a Color.
- See Also:
Resource,
Color
|
Field Summary |
private java.awt.Color |
color
|
private static java.util.logging.Logger |
logger
|
static java.lang.String |
SCHEME
|
|
Method Summary |
java.awt.Color |
getColor()
Gets the Color represented by this resource. |
static java.awt.Color |
getColor(java.lang.String colorName)
Returns the Color identified by the given
string. |
void |
preload()
Preloading is a noop for this resource type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final java.util.logging.Logger logger
SCHEME
public static final java.lang.String SCHEME
- See Also:
- Constant Field Values
color
private java.awt.Color color
ColorResource
public ColorResource(java.awt.Color color)
ColorResource
ColorResource(java.net.URI resourceLocator)
throws java.lang.Exception
- Do not use directly.
- Parameters:
resourceLocator - The URI used when loading this
resource.
- Throws:
java.lang.Exception- See Also:
ResourceFactory.createResource(URI)
preload
public void preload()
- Preloading is a noop for this resource type.
- Specified by:
preload in class Resource
getColor
public static java.awt.Color getColor(java.lang.String colorName)
- Returns the
Color identified by the given
string. This is either a hexadecimal integer prefixed with
"0x", or the name of a field of the Color class.
- Parameters:
colorName - a String value
- Returns:
- a
Color value
getColor
public java.awt.Color getColor()
- Gets the
Color represented by this resource.
- Returns:
- The
Color in it's original size.