edu.brook.ascape.view
Class ColorFeatureGradiatedIndex
java.lang.Object
|
+--edu.brook.ascape.view.ColorFeatureConcrete
|
+--edu.brook.ascape.view.ColorFeatureGradiated
|
+--edu.brook.ascape.view.ColorFeatureGradiatedIndex
- public class ColorFeatureGradiatedIndex
- extends ColorFeatureGradiated
A class for displaying a gradiated color whose intensity is determined by the
supplied UnitIntervalDataPoint. This implementation keeps an array of one thousand
colors that are created dynamically and then referred to as needed, improving
performance significantly over creating new colors for each value.
Important: To obtain maximum performance, the value is not bracketed,
that is, this class uses the 'raw' value obtained from the UnitIntervalDataPoint.
If that value is not between 0.0-1.0 inclusive, an ArrayIndexOutOfBounds
exception will be thrown. If you are not sure that your value will always
be clean, use ColorFeatureGradiated. If there is demand, I'll create a version of
this class that does use the bracketed value.
- Version:
- 1.2.5
- See Also:
- Serialized Form
| Fields inherited from class edu.brook.ascape.view.ColorFeatureGradiated |
blueAdjustment,
blueBase,
blueMaximum,
blueMinimum,
dataPoint,
greenAdjustment,
greenBase,
greenMaximum,
greenMinimum,
redAdjustment,
redBase,
redMaximum,
redMinimum |
|
Method Summary |
java.awt.Color |
getColor(java.lang.Object object)
Returns maximum color at intensity defined by the data point. |
| Methods inherited from class java.lang.Object |
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ColorFeatureGradiatedIndex
public ColorFeatureGradiatedIndex(java.lang.String name)
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 ColorFeatureGradiated