public class ColorScale
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
ColorScale.MinMaxType |
static class |
ColorScale.Panel |
Modifier and Type | Field and Description |
---|---|
static int |
HORIZONTAL |
static java.awt.Color[] |
hueBands |
static java.awt.Color[] |
redBlue |
static java.awt.Color[] |
redHot |
static java.awt.Color[] |
spectrum2 |
static int |
VERTICAL |
Constructor and Description |
---|
ColorScale() |
ColorScale(java.lang.String name) |
ColorScale(java.lang.String name,
java.awt.Color[] c) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
add action event listener
|
java.lang.Object |
clone() |
java.awt.Color |
getColor(int i) |
double |
getEdge(int index)
Get the edge of the ith interval.
|
int |
getHistMax()
This is an optimization for counting the number of colors in each interval.
|
int |
getIndexFromValue(double value)
Get which color interval this value lies in.
|
int |
getIndexFromValueLog(double value) |
java.awt.Color |
getMissingDataColor() |
java.lang.String |
getName()
Get the colorscale name.
|
int |
getNumColors()
Get the number of colors in the colorscale.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
remove action event listener
|
void |
resetHist()
reset the histogram.
|
void |
setGeoGrid(IsMissingEvaluator gg) |
void |
setMinMax(double min,
double max)
Set the data min/max interval.
|
void |
setName(java.lang.String name)
Set the colorscale name.
|
void |
setNumColors(int n)
Set the number of colors in the colorscale.
|
java.lang.String |
toString() |
public static final int VERTICAL
public static final int HORIZONTAL
public static final java.awt.Color[] redHot
public static final java.awt.Color[] redBlue
public static final java.awt.Color[] hueBands
public static final java.awt.Color[] spectrum2
public ColorScale(java.lang.String name, java.awt.Color[] c)
public ColorScale(java.lang.String name)
public ColorScale()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
public java.lang.String getName()
public void setName(java.lang.String name)
public int getNumColors()
public void setNumColors(int n)
public java.awt.Color getColor(int i)
public double getEdge(int index)
public void setGeoGrid(IsMissingEvaluator gg)
public java.awt.Color getMissingDataColor()
public int getIndexFromValue(double value)
value
- minimum data value.public int getIndexFromValueLog(double value)
public void setMinMax(double min, double max)
edge data interval 0 min value <= min 1 min+incr min <= value < min + incr 2 min+2*incr min+incr <= value < min+2*incr ith min+i*incr min+(i-1)*incr <= value < min+i*incr n-2 max min+(n-3)*incr <= value < max n-1 max max < value n value = missingDataValue
min
- minimum data valuemax
- maximum data valuepublic int getHistMax()
public void resetHist()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object