edu.brook.ascape.view
Class ColorFeatureGradiated

java.lang.Object
  |
  +--edu.brook.ascape.view.ColorFeatureConcrete
        |
        +--edu.brook.ascape.view.ColorFeatureGradiated
Direct Known Subclasses:
ColorFeatureGradiatedIndex

public class ColorFeatureGradiated
extends ColorFeatureConcrete

A class for displaying a gradiated color whose intensity is determined by the supplied UnitIntervalDataPoint. The data point is bracketed, so values outside of the range 0.0 - 1.0 will be treeated as minimum and maximum respectivly.

Since:
1.0
Version:
1.2
See Also:
Serialized Form

Field Summary
protected  float blueAdjustment
          The adjustment value of the blue component of this color.
protected  float blueBase
          The base value of the blue component of this color.
protected  float blueMaximum
          The maximum value of the blue component of this color.
protected  float blueMinimum
          The minimum value of the blue component of this color.
protected  UnitIntervalDataPoint dataPoint
          The unit interval data point used to calculate the gradiated color.
protected  float greenAdjustment
          The adjustment value of the green component of this color.
protected  float greenBase
          The base value of the green component of this color.
protected  float greenMaximum
          The maximum value of the green component of this color.
protected  float greenMinimum
          The minimum value of the green component of this color.
protected  float redAdjustment
          The adjustment value of the red component of this color.
protected  float redBase
          The base value of the red component of this color.
protected  float redMaximum
          The maximum value of the red component of this color.
protected  float redMinimum
          The minimum value of the red component of this color.
 
Fields inherited from class edu.brook.ascape.view.ColorFeatureConcrete
name
 
Constructor Summary
ColorFeatureGradiated()
          Constructs a ColorFeatureGradiated.
ColorFeatureGradiated(java.awt.Color maximumColor, UnitIntervalDataPoint dataPoint)
          Constructs a ColorFeatureGradiated with the supplied unit interval and maximum color.
ColorFeatureGradiated(java.lang.String name)
          Constructs the gradiated color feature with the supplied name.
ColorFeatureGradiated(java.lang.String name, java.awt.Color maximumColor, java.awt.Color minimumColor, UnitIntervalDataPoint dataPoint)
          Constructs a ColorFeatureGradiated with the supplied name, maximum color, and unit interval.
ColorFeatureGradiated(java.lang.String name, java.awt.Color maximumColor, UnitIntervalDataPoint dataPoint)
          Constructs a ColorFeatureGradiated with the supplied name, maximum color, and unit interval.
 
Method Summary
protected  void calculateColorValues()
          Calculates the values to be used for quickly returning a color within graidient.
 java.lang.Object clone()
          Clones this feature.
 java.awt.Color getColor(java.lang.Object object)
          Returns maximum color at intensity defined by the data point.
 UnitIntervalDataPoint getDataPoint()
          Returns the data point used to calculate color.
 java.lang.String getName()
          Returns the name of the gradiated color feature.
 void setDataPoint(UnitIntervalDataPoint dataPoint)
          Sets a unit data point that will return some number between 0.0 and 1.0
 void setMaximumColor(java.awt.Color valueColor)
          Sets the color at maximum intensity; that is, the color that would be returned if the unit value were 1.0.
 void setMinimumColor(java.awt.Color valueColor)
          Sets the color at minimum intensity; that is, the color that would be returned if the unit value were 0.0.
 
Methods inherited from class edu.brook.ascape.view.ColorFeatureConcrete
setName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

redMinimum

protected float redMinimum
The minimum value of the red component of this color.

greenMinimum

protected float greenMinimum
The minimum value of the green component of this color.

blueMinimum

protected float blueMinimum
The minimum value of the blue component of this color.

redMaximum

protected float redMaximum
The maximum value of the red component of this color.

greenMaximum

protected float greenMaximum
The maximum value of the green component of this color.

blueMaximum

protected float blueMaximum
The maximum value of the blue component of this color.

redBase

protected float redBase
The base value of the red component of this color.

greenBase

protected float greenBase
The base value of the green component of this color.

blueBase

protected float blueBase
The base value of the blue component of this color.

redAdjustment

protected float redAdjustment
The adjustment value of the red component of this color.

greenAdjustment

protected float greenAdjustment
The adjustment value of the green component of this color.

blueAdjustment

protected float blueAdjustment
The adjustment value of the blue component of this color.

dataPoint

protected UnitIntervalDataPoint dataPoint
The unit interval data point used to calculate the gradiated color.
Constructor Detail

ColorFeatureGradiated

public ColorFeatureGradiated()
Constructs a ColorFeatureGradiated.

ColorFeatureGradiated

public ColorFeatureGradiated(java.lang.String name)
Constructs the gradiated color feature with the supplied name.
Parameters:
name - the name of this draw feature

ColorFeatureGradiated

public ColorFeatureGradiated(java.awt.Color maximumColor,
                             UnitIntervalDataPoint dataPoint)
Constructs a ColorFeatureGradiated with the supplied unit interval and maximum color.
Parameters:
maximumColor - the color to be returned at unit maximum
dataPoint - a unit interval data point (0..1) providing the relative intensity of a color for a given object

ColorFeatureGradiated

public ColorFeatureGradiated(java.lang.String name,
                             java.awt.Color maximumColor,
                             UnitIntervalDataPoint dataPoint)
Constructs a ColorFeatureGradiated with the supplied name, maximum color, and unit interval.
Parameters:
name - the name of this color feature
maximumColor - the color to be returned at unit maximum
dataPoint - a unit interval data point (0..1) providing the relative intensity of a color for a given object

ColorFeatureGradiated

public ColorFeatureGradiated(java.lang.String name,
                             java.awt.Color maximumColor,
                             java.awt.Color minimumColor,
                             UnitIntervalDataPoint dataPoint)
Constructs a ColorFeatureGradiated with the supplied name, maximum color, and unit interval.
Parameters:
name - the name of this color feature
minimumColor - the color to be returned at unit minimum
maximumColor - the color to be returned at unit maximum
dataPoint - a unit interval data point (0..1) providing the relative intensity of a color for a given object
Method Detail

getDataPoint

public UnitIntervalDataPoint getDataPoint()
Returns the data point used to calculate color. (As an alternative to setting this value, you may override with a method returning a data point.)

setDataPoint

public void setDataPoint(UnitIntervalDataPoint dataPoint)
Sets a unit data point that will return some number between 0.0 and 1.0

getName

public java.lang.String getName()
Returns the name of the gradiated color feature. Override to provide a different name.
Overrides:
getName in class ColorFeatureConcrete

getColor

public java.awt.Color getColor(java.lang.Object object)
Returns maximum color at intensity defined by the data point.
Parameters:
object - the object to get a color from.
Overrides:
getColor in class ColorFeatureConcrete

calculateColorValues

protected void calculateColorValues()
Calculates the values to be used for quickly returning a color within graidient.

setMinimumColor

public void setMinimumColor(java.awt.Color valueColor)
Sets the color at minimum intensity; that is, the color that would be returned if the unit value were 0.0.

setMaximumColor

public void setMaximumColor(java.awt.Color valueColor)
Sets the color at maximum intensity; that is, the color that would be returned if the unit value were 1.0.

clone

public java.lang.Object clone()
Clones this feature.
Overrides:
clone in class java.lang.Object

(c) 1998-2000 The Brookings Insitution
Webpage