sgtplot
Class CLIndexedColorMap
- java.lang.Object
-
- sgtplot.ColorMap
-
- sgtplot.CLIndexedColorMap
-
- All Implemented Interfaces:
- java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, ContourLevelsAccess, IndexedColor
public class CLIndexedColorMap extends ColorMap implements java.lang.Cloneable, java.beans.PropertyChangeListener, IndexedColor, ContourLevelsAccess
CLIndexedColorMapprovides a mapping from a value to aColor.- Since:
- 2.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description CLIndexedColorMap(java.awt.Color[] colors)Initialize the color map with an array ofColorobjects.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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ColorMapcopy()Create a copy of theColorMapbooleanequals(ColorMap cm)Test for equality of color maps.java.awt.ColorgetColor(double val)Get aColor.java.awt.ColorgetColorByIndex(int indx)Get aColor.ContourLevelsgetContourLevels()GetContourLevels.intgetMaximumIndex()Get the maximum color index.Range2DgetRange()Get the current user range for theTransform.voidsetColor(int index, java.awt.Color colr)Change theColor.voidsetColor(int indx, int red, int green, int blue)Change theColor.voidsetContourLevels(ContourLevels cl)SetContourLevels.-
Methods inherited from class sgtplot.ColorMap
addPropertyChangeListener, isBatch, propertyChange, removePropertyChangeListener, setBatch, setBatch
-
-
-
-
Constructor Detail
-
CLIndexedColorMap
public CLIndexedColorMap(int[] red, int[] green, int[] blue)Initialize the color map with int arrays of red, green, and blue. The arrays must be the same length. Sets upColorMapforINDEXEDaccess.- Parameters:
red- Array of the red component 0 - 255.green- Array of the green component 0 - 255.blue- Array of the blue component 0 - 255.- See Also:
Color
-
CLIndexedColorMap
public CLIndexedColorMap(float[] red, float[] green, float[] blue)Initialize the color map with float arrays of red, green, and blue. The arrays must be the same length. Sets upColorMapforINDEXEDaccess.- Parameters:
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.- See Also:
Color
-
CLIndexedColorMap
public CLIndexedColorMap(java.awt.Color[] colors)
Initialize the color map with an array ofColorobjects. Sets upColorMapforINDEXEDaccess.- Parameters:
colors- Array of the Color objects.- See Also:
Color
-
-
Method Detail
-
getColorByIndex
public java.awt.Color getColorByIndex(int indx)
Get aColor.- Specified by:
getColorByIndexin interfaceIndexedColor- Returns:
- color
- Since:
- 3.0
-
getColor
public java.awt.Color getColor(double val)
Get aColor.
-
getRange
public Range2D getRange()
Get the current user range for theTransform.
-
setColor
public void setColor(int index, java.awt.Color colr)Change theColor.- Specified by:
setColorin interfaceIndexedColor- Parameters:
colr- newColorindx- index of color
-
setColor
public void setColor(int indx, int red, int green, int blue)Change theColor.
Property Change:color.- Specified by:
setColorin interfaceIndexedColor- Parameters:
red- red componentgreen- green componentblue- blue componentindx- index of color
-
getMaximumIndex
public int getMaximumIndex()
Get the maximum color index.- Specified by:
getMaximumIndexin interfaceIndexedColor- Returns:
- maximum legal color index
-
setContourLevels
public void setContourLevels(ContourLevels cl)
SetContourLevels.
Property Change:color.- Specified by:
setContourLevelsin interfaceContourLevelsAccess- Parameters:
cl-ContourLevels
-
getContourLevels
public ContourLevels getContourLevels()
GetContourLevels.- Specified by:
getContourLevelsin interfaceContourLevelsAccess- Returns:
ContourLevels
-
-
DMelt 3.0 © DataMelt by jWork.ORG