public class PaletteEntryForRange extends java.lang.Object implements PaletteEntry
In keeping with the conventions of many Geographic Information Systems (GIS) and art applications, this instance "covered" values in the range v0 ≤ f < v1. Thus, a value that exactly matches the upper bound of the range is not considered "covered".
| Constructor and Description |
|---|
PaletteEntryForRange(float v0,
float v1,
java.awt.Color color)
Constructs a palette entry for the range of values v0 ≤ f < v1.
|
PaletteEntryForRange(float v0,
float v1,
java.awt.Color color0,
java.awt.Color color1)
Constructs a palette entry for the range of values v0 ≤ f < v1.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
coversSingleEntry()
Indicates that the entry covers exactly one unique value (including,
potentially, Float.NaN).
|
int |
getARGB(float f)
Gets the integer ARGB color assignment associated with the input value.
|
java.awt.Color |
getColor(float f)
Gets the color assignment associated with the input value.
|
float |
getLowerBound()
Gets the lower-bound value for the palette entry
|
float |
getUpperBound()
Gets the upper-bound value for the palette entry
|
boolean |
isCovered(float f)
Indicates whether the indicated floating-point value is within the range
covered by this palette entry and can be assigned a valid color by the
implementation.
|
java.lang.String |
toString() |
public PaletteEntryForRange(float v0,
float v1,
java.awt.Color color0,
java.awt.Color color1)
v0 - the lower bounds (inclusive) of the covered range of valuesv1 - the upper bounds (non-inclusive) of the covered range of valuecolor0 - the color assigned to value v0color1 - the color assigned to value v1public PaletteEntryForRange(float v0,
float v1,
java.awt.Color color)
v0 - the lower bounds (inclusive) of the covered range of valuesv1 - the upper bounds (non-inclusive) of the covered range of valuecolor - the color assigned to value v0public boolean isCovered(float f)
PaletteEntryisCovered in interface PaletteEntryf - a valid floating point value, or a NaN.public int getARGB(float f)
PaletteEntrygetARGB in interface PaletteEntryf - valid floating point value, or a NaN.public java.awt.Color getColor(float f)
PaletteEntrygetColor in interface PaletteEntryf - a valid floating point value, or a NaN.public boolean coversSingleEntry()
PaletteEntrycoversSingleEntry in interface PaletteEntrypublic float getLowerBound()
PaletteEntrygetLowerBound in interface PaletteEntrypublic float getUpperBound()
PaletteEntrygetUpperBound in interface PaletteEntrypublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2010 - 2023 Adobe. All Rights Reserved