edu.brook.ascape.view
Class ColorFeatureConcrete
java.lang.Object
|
+--edu.brook.ascape.view.ColorFeatureConcrete
- Direct Known Subclasses:
- ColorFeatureFixed, ColorFeatureGradiated
- public abstract class ColorFeatureConcrete
- extends java.lang.Object
- implements java.lang.Cloneable, java.io.Serializable, ColorFeature
A Color feature returns a color based on the state of an object of known type provided to it.
This class provides a concrete version of color feature for convenience in implementing subclasses.
Used to provide an appropriate color for some feature or aspect of an object.
- Since:
- 1.2
- Version:
- 1.2
- See Also:
- Serialized Form
|
Field Summary |
protected java.lang.String |
name
The name of the feature. |
|
Constructor Summary |
ColorFeatureConcrete()
Constructs a concrete instantiation of a color feature. |
ColorFeatureConcrete(java.lang.String name)
Constructs a concrete instantiation of a color feature with the supplied name. |
|
Method Summary |
abstract java.awt.Color |
getColor(java.lang.Object object)
Returns a color for the object as defined in implementions of this class. |
java.lang.String |
getName()
Returns a name for the object as defined by set name. |
void |
setName(java.lang.String name)
Sets the name of this feature. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
name
protected java.lang.String name
- The name of the feature.
ColorFeatureConcrete
public ColorFeatureConcrete()
- Constructs a concrete instantiation of a color feature.
ColorFeatureConcrete
public ColorFeatureConcrete(java.lang.String name)
- Constructs a concrete instantiation of a color feature with the supplied name.
- Parameters:
the - user relevant name of the feature
getName
public java.lang.String getName()
- Returns a name for the object as defined by set name.
setName
public final void setName(java.lang.String name)
- Sets the name of this feature.
- Parameters:
name - a user relevant name for this feature
getColor
public abstract java.awt.Color getColor(java.lang.Object object)
- Returns a color for the object as defined in implementions of this class.
- Specified by:
- getColor in interface ColorFeature
- Parameters:
object - the object to get a color from.