noope.output
Class OutputProjectionColoredPropertyRecord
java.lang.Object
|
+--noope.laws.LawPropertyRecord
|
+--noope.output.OutputProjectionPropertyRecord
|
+--noope.output.OutputProjectionColoredPropertyRecord
- Direct Known Subclasses:
- OutputProjectionPointPropertyRecord, OutputProjectionShapePropertyRecord
- public abstract class OutputProjectionColoredPropertyRecord
- extends OutputProjectionPropertyRecord
This is an abstract subclass of OutputProjectionPropertyRecord implementing a color property.
This LawPropertyRecord stores one color and is suitable for objects that you want to draw in
one color.
- Version:
- 30 March 2001
- Author:
- Miklos Reiter
Field Summary |
protected java.awt.Color |
color
This field stores the color used to draw the object. |
static java.awt.Color |
defaultColor
The default color used to draw the object if none is given. |
protected double |
oldX
|
protected double |
oldY
|
Method Summary |
protected static java.awt.Color |
lookupColor(java.lang.String s,
BlockReader br)
Tries to look up the color named in s. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultColor
public static java.awt.Color defaultColor
- The default color used to draw the object if none is given.
color
protected java.awt.Color color
- This field stores the color used to draw the object.
oldX
protected double oldX
oldY
protected double oldY
OutputProjectionColoredPropertyRecord
public OutputProjectionColoredPropertyRecord(BlockReader br,
Entity ent)
throws BRLoadingException
- Constructs a new OutputProjectionPropertyRecord object from the BlockReader br and
for the Entity ent. The BlockReader can be empty or even null, in which case
defaultColor is used. It may contain the
key "colorName" with String value in {black, blue, cyan, darkGray, gray, green, lightGray,
magenta, orange, pink, red, white, yellow} *or* the key "colorRGB" which has to be a
Vector3D object (i.e. a String of the form "(x, y, z)") with x, y and z doubles in the
range 0-1.
lookupColor
protected static java.awt.Color lookupColor(java.lang.String s,
BlockReader br)
throws BRLoadingException
- Tries to look up the color named in s. If it fails, i.e. if the string is different
from all the ones enumerated in the description of the constructor, then it throws
a BRLoadingException.