org.ascape.util.vis
Class ColorFeatureConcrete

java.lang.Object
  extended by org.ascape.util.vis.ColorFeatureConcrete
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, HasName, ColorFeature
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
Author:
Miles Parker
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
 

Field Detail

name

protected java.lang.String name
The name of the feature.

Constructor Detail

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:
name - the user relevant name of the feature
Method Detail

getName

public java.lang.String getName()
Returns a name for the object as defined by set name.

Specified by:
getName in interface HasName

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.


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.