Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ascape.util.vis
Class ColorFeatureGradiatedIndex

    java.lang.Object
      org.ascape.util.vis.ColorFeatureConcrete
          org.ascape.util.vis.ColorFeatureGradiated
              org.ascape.util.vis.ColorFeatureGradiatedIndex

All Implemented Interfaces:
  java.lang.Cloneable, HasName, ColorFeature

    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, a RuntimeException 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.9.1
Author:
  Miles Parker

Field Summary

Fields inherited from class org.ascape.util.vis.ColorFeatureGradiated
`blueBase, blueMaximum, blueMinimum, dataPoint, greenBase, greenMaximum, greenMinimum, redBase, redMaximum, redMinimum`

Fields inherited from class org.ascape.util.vis.ColorFeatureConcrete
`colorCache, name`

Fields inherited from interface org.ascape.util.vis.ColorFeature
`BLACK, BLUE, CYAN, DARK_BLUE, DARK_GRAY, DARK_GREEN, DARK_MAGENTA, DARK_RED, DARK_YELLOW, DEFAULT_BG, GRAY, GREEN, HIGHLIGHT_AGENT_COLOR, LIGHT_GRAY, MAGENTA, ORANGE, RED, WHITE, YELLOW`

Constructor Summary
`ColorFeatureGradiatedIndex(java.lang.String name)`
`ColorFeatureGradiatedIndex(java.lang.String name, org.eclipse.swt.graphics.Color maximumColor, org.eclipse.swt.graphics.Color minimumColor, UnitIntervalDataPoint dataPoint)` Constructs a ColorFeatureGradiated with the supplied name, maximum color, and unit interval.
`ColorFeatureGradiatedIndex(java.lang.String name, org.eclipse.swt.graphics.Color maximumColor, UnitIntervalDataPoint dataPoint)` Constructs a ColorFeatureGradiated with the supplied name, maximum color, and unit interval.

Method Summary
`org.eclipse.swt.graphics.Color` | `getColor(java.lang.Object object)` Returns maximum color at intensity defined by the data point.

Methods inherited from class org.ascape.util.vis.ColorFeatureGradiated
`clone, getColor, getDataPoint, getName, setDataPoint, setMaximumColor, setMinimumColor`

Methods inherited from class org.ascape.util.vis.ColorFeatureConcrete
`adjustBrightness, create, create, create, create, createHSB, createRandom, setName`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ColorFeatureGradiatedIndex

    public ColorFeatureGradiatedIndex(java.lang.String name)

### ColorFeatureGradiatedIndex

    public ColorFeatureGradiatedIndex(java.lang.String name,
                                      org.eclipse.swt.graphics.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

### ColorFeatureGradiatedIndex

    public ColorFeatureGradiatedIndex(java.lang.String name,
                                      org.eclipse.swt.graphics.Color maximumColor,
                                      org.eclipse.swt.graphics.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

### getColor

    public org.eclipse.swt.graphics.Color getColor(java.lang.Object object)

  Returns maximum color at intensity defined by the data point.

  Specified by:
    `getColor` in interface `ColorFeature`
  Overrides:
    `getColor` in class `ColorFeatureGradiated`
  Parameters:
    `object` - the object to get a color from.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD