Package rma.util
Class CategoricalColorContour
java.lang.Object
rma.util.ColorContour
rma.util.CategoricalColorContour
- All Implemented Interfaces:
AsciiSerializable,FieldAccessor,Serializable,Cloneable
This class is intended to map comparable objects to colors, and support the use of indexed values
for accessing the categories.
This was originally intended to work in a similar fashion as the BandedColorContour, except that
the BandedColorContour always used doubles. In this case, doubles are used to access the
category by index. The index repeats as it's i % size.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class rma.util.ColorContour
_bright, _max, _maxClip, _maxMinusMin, _min, _minClip, _sat, _scaleToClipping, _typeToClass, ASPECT_SHADING_TYPE, GRAYSCALE_TYPE, LINEAR_TYPE, mPropertyChangeSupport, PRECIPITATION_TYPE, RED_GREEN_BLUE_TYPE, TERRAIN_TYPE, WATER_DEPTH_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategories(List<CategoricalColorContour.Category<?>> categories) voidaddCategories(CategoricalColorContour.Category<?>... categories) voidaddCategory(CategoricalColorContour.Category<?> category) <T> voidaddCategory(T category, Color color) voidgetColorForCategory(Object category) doubledoubleprotected voidgetRGB0(double[] rgb, double val, double minValue, double maxValue) protected double[]getRGB0(double val, double minValue, double maxValue) voidremoveCategory(CategoricalColorContour.Category<?> category) removeCategory(T category) voidsetCategories(List<CategoricalColorContour.Category<?>> categories) voidsetCategories(CategoricalColorContour.Category<?>... categories) voidsetDefaultColor(Color defaultColor) Methods inherited from class rma.util.ColorContour
addExtras, addPropertyChangeListener, clone, copyInto, createContourFromAttributes, getAttributes, getAttributes, getBrightness, getColor, getColor, getFieldObject, getInstanceForType, getRGB, getRGB, getSaturation, getScaleToClipping, getType, getTypes, read, read0, removePropertyChangeSupport, setAttributes, setBrightness, setFieldObject, setMaxClipping, setMaxValue, setMinClipping, setMinValue, setSaturation, setScaleToClipping, write
-
Constructor Details
-
CategoricalColorContour
public CategoricalColorContour()
-
-
Method Details
-
getMaxClipping
- Overrides:
getMaxClippingin classColorContour
-
getMinClipping
- Overrides:
getMinClippingin classColorContour
-
getMaxValue
public double getMaxValue()- Overrides:
getMaxValuein classColorContour
-
getMinValue
public double getMinValue()- Overrides:
getMinValuein classColorContour
-
getCategories
-
addCategories
-
setCategories
-
setCategories
-
addCategories
-
addCategory
-
addCategory
-
removeCategory
-
removeCategory
-
getDefaultColor
-
setDefaultColor
-
getColorForCategory
-
getRGB0
protected double[] getRGB0(double val, double minValue, double maxValue) - Specified by:
getRGB0in classColorContour
-
getRGB0
protected void getRGB0(double[] rgb, double val, double minValue, double maxValue) - Specified by:
getRGB0in classColorContour
-
clearCategories
public void clearCategories()
-