org.opensourcephysics.display2d
Class VectorColorMapper

java.lang.Object
  extended byorg.opensourcephysics.display2d.VectorColorMapper

public class VectorColorMapper
extends java.lang.Object


Field Summary
static int BLACK
           
static int BLUE
           
static int GREEN
           
static int RED
           
static int SPECTRUM
           
 
Constructor Summary
VectorColorMapper(int _numColors, double _ceil)
           
 
Method Summary
protected  void checkPallet(java.awt.Color backgroundColor)
           
 java.awt.Color doubleToColor(double mag)
          Converts a double to a color.
 double getCeiling()
           
 double getFloor()
           
protected  void setPaletteType(int _paletteType)
          Sets the color palette.
 void setScale(double _ceil)
          Sets the scale.
 javax.swing.JFrame showLegend()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPECTRUM

public static final int SPECTRUM
See Also:
Constant Field Values

RED

public static final int RED
See Also:
Constant Field Values

BLUE

public static final int BLUE
See Also:
Constant Field Values

GREEN

public static final int GREEN
See Also:
Constant Field Values

BLACK

public static final int BLACK
See Also:
Constant Field Values
Constructor Detail

VectorColorMapper

public VectorColorMapper(int _numColors,
                         double _ceil)
Method Detail

getFloor

public double getFloor()

getCeiling

public double getCeiling()

setPaletteType

protected void setPaletteType(int _paletteType)
Sets the color palette.

Parameters:
_paletteType -

checkPallet

protected void checkPallet(java.awt.Color backgroundColor)

setScale

public void setScale(double _ceil)
Sets the scale.

Parameters:
_ceil -

doubleToColor

public java.awt.Color doubleToColor(double mag)
Converts a double to a color.

Parameters:
mag -
Returns:
the color

showLegend

public javax.swing.JFrame showLegend()