|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.noaa.pmel.sgt.ColorMap
gov.noaa.pmel.sgt.CLIndexedColorMap
public class CLIndexedColorMap
CLIndexedColorMap
provides a mapping from a value to a
Color
.
Field Summary | |
---|---|
protected ContourLevels |
cl_
|
protected java.awt.Color[] |
colors_
|
Fields inherited from class gov.noaa.pmel.sgt.ColorMap |
---|
batch_, local_, modified_ |
Constructor Summary | |
---|---|
CLIndexedColorMap(java.awt.Color[] colors)
Initialize the color map with an array of Color
objects. |
|
CLIndexedColorMap(float[] red,
float[] green,
float[] blue)
Initialize the color map with float arrays of red, green, and blue. |
|
CLIndexedColorMap(int[] red,
int[] green,
int[] blue)
Initialize the color map with int arrays of red, green, and blue. |
Method Summary | |
---|---|
ColorMap |
copy()
Create a copy of the ColorMap |
boolean |
equals(ColorMap cm)
Test for equality of color maps. |
java.awt.Color |
getColor(double val)
Get a Color . |
java.awt.Color |
getColorByIndex(int indx)
Get a Color . |
ContourLevels |
getContourLevels()
Get ContourLevels . |
int |
getMaximumIndex()
Get the maximum color index. |
Range2D |
getRange()
Get the current user range for the Transform . |
void |
setColor(int index,
java.awt.Color colr)
Change the Color . |
void |
setColor(int indx,
int red,
int green,
int blue)
Change the Color . |
void |
setContourLevels(ContourLevels cl)
Set ContourLevels . |
Methods inherited from class gov.noaa.pmel.sgt.ColorMap |
---|
addPropertyChangeListener, firePropertyChange, isBatch, propertyChange, removePropertyChangeListener, setBatch, setBatch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.beans.PropertyChangeListener |
---|
propertyChange |
Field Detail |
---|
protected java.awt.Color[] colors_
protected ContourLevels cl_
Constructor Detail |
---|
public CLIndexedColorMap(int[] red, int[] green, int[] blue)
ColorMap
for INDEXED
access.
red
- Array of the red component 0 - 255.green
- Array of the green component 0 - 255.blue
- Array of the blue component 0 - 255.Color
public CLIndexedColorMap(float[] red, float[] green, float[] blue)
ColorMap
for INDEXED
access.
red
- Array of the red component 0.0 - 1.0.green
- Array of the green component 0.0 - 1.0.blue
- Array of the blue component 0.0 - 1.0.Color
public CLIndexedColorMap(java.awt.Color[] colors)
Color
objects. Sets up ColorMap
for
INDEXED
access.
colors
- Array of the Color objects.Color
Method Detail |
---|
public ColorMap copy()
ColorMap
copy
in class ColorMap
public java.awt.Color getColorByIndex(int indx)
Color
.
getColorByIndex
in interface IndexedColor
public java.awt.Color getColor(double val)
Color
.
getColor
in class ColorMap
val
- Value
public Range2D getRange()
Transform
.
getRange
in class ColorMap
public void setColor(int index, java.awt.Color colr)
Color
.
setColor
in interface IndexedColor
colr
- new Color
indx
- index of colorpublic void setColor(int indx, int red, int green, int blue)
Color
.
color
.
setColor
in interface IndexedColor
red
- red componentgreen
- green componentblue
- blue componentindx
- index of colorpublic int getMaximumIndex()
getMaximumIndex
in interface IndexedColor
public void setContourLevels(ContourLevels cl)
ContourLevels
.
color
.
setContourLevels
in interface ContourLevelsAccess
cl
- ContourLevels
public ContourLevels getContourLevels()
ContourLevels
.
getContourLevels
in interface ContourLevelsAccess
ContourLevels
public boolean equals(ColorMap cm)
ColorMap
equals
in class ColorMap
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |