|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.display2d.ColorMapper
public class ColorMapper
Field Summary | |
---|---|
static int |
BLACK
|
static int |
BLUE
|
static int |
DUALSHADE
|
static int |
GRAYSCALE
|
static int |
GREEN
|
static int |
NORENDER
|
static int |
RED
|
static int |
REDBLUE_SHADE
|
static int |
SPECTRUM
|
static int |
WIREFRAME
|
protected ZExpansion |
zMap
|
Constructor Summary | |
---|---|
ColorMapper(int _numColors,
double _floor,
double _ceil,
int palette)
Constructor ColorMapper |
Method Summary | |
---|---|
java.awt.Color |
doubleToColor(double value)
Converts a double to a color. |
byte[] |
doubleToComponents(double value,
byte[] rgb)
Converts a double to color components. |
double |
getCeil()
Gets the ceiling color. |
java.awt.Color |
getCeilColor()
Gets the ceiling color. |
static java.awt.Color[] |
getColorPalette(int numColors,
int paletteType)
Gets a array of colors for use in data visualization. |
double |
getFloor()
Gets the floor. |
java.awt.Color |
getFloorColor()
Gets the floor color; |
javax.swing.JFrame |
getLegendFrame()
|
static XML.ObjectLoader |
getLoader()
Gets a loader that allows a Circle to be represented as XML data. |
int |
getNumColors()
Gets the number of colors between the floor and ceiling values. |
int |
getPaletteType()
Returns the color palette. |
void |
setColorPalette(java.awt.Color[] _colors)
Sets the color palette. |
void |
setFloorCeilColor(java.awt.Color _floorColor,
java.awt.Color _ceilColor)
Sets the floor and ceiling colors. |
void |
setNumberOfColors(int _numColors)
Sets the number of colors |
void |
setPaletteType(int _paletteType)
Sets the color palette. |
void |
setScale(double _floor,
double _ceil)
Sets the scale. |
void |
setZMap(ZExpansion map)
Sets map for z values. |
javax.swing.JFrame |
showLegend()
Shows the color legend. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SPECTRUM
public static final int GRAYSCALE
public static final int DUALSHADE
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int BLACK
public static final int WIREFRAME
public static final int NORENDER
public static final int REDBLUE_SHADE
protected ZExpansion zMap
Constructor Detail |
---|
public ColorMapper(int _numColors, double _floor, double _ceil, int palette)
_numColors
- _floor
- _ceil
- palette
- Method Detail |
---|
public javax.swing.JFrame getLegendFrame()
public javax.swing.JFrame showLegend()
public void setScale(double _floor, double _ceil)
_floor
- _ceil
- public byte[] doubleToComponents(double value, byte[] rgb)
value
- doublergb
- byte[]
public java.awt.Color doubleToColor(double value)
value
-
public void setZMap(ZExpansion map)
map
- ZExpansionpublic double getFloor()
public java.awt.Color getFloorColor()
public double getCeil()
public java.awt.Color getCeilColor()
public int getNumColors()
public void setFloorCeilColor(java.awt.Color _floorColor, java.awt.Color _ceilColor)
_floorColor
- _ceilColor
- public int getPaletteType()
public void setColorPalette(java.awt.Color[] _colors)
_colors
- public void setNumberOfColors(int _numColors)
_numColors
- public void setPaletteType(int _paletteType)
_paletteType
- public static java.awt.Color[] getColorPalette(int numColors, int paletteType)
numColors
- paletteType
-
public static XML.ObjectLoader getLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |