org.opensourcephysics.display2d
Class VectorColorMapper

java.lang.Object
  extended by org.opensourcephysics.display2d.VectorColorMapper

public class VectorColorMapper
extends java.lang.Object


Field Summary
static int BLACK
           
static int BLUE
           
static int GRAY
           
static int GREEN
           
static int RED
           
static int SPECTRUM
           
 
Constructor Summary
VectorColorMapper(int _numColors, double _ceil)
          Constructor VectorColorMapper
 
Method Summary
 void checkPallet(java.awt.Color backgroundColor)
          Checks to see if background color matches the color palette background.
 java.awt.Color doubleToColor(double mag)
          Converts a double to a color.
 java.awt.Color doubleToCompColor(double mag)
          Converts a double to a the complementary color.
 double getCeiling()
           
 double getFloor()
           
 javax.swing.JFrame getLegendFrame()
           
 void setNumberOfColors(int _numColors)
          Sets the number of colors
 void setPaletteType(int _paletteType)
          Sets the color palette.
 void setScale(double _ceil)
          Sets the scale.
 javax.swing.JFrame showLegend()
           
 void updateLegend()
           
 
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

GRAY

public static final int GRAY
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)
Constructor VectorColorMapper

Parameters:
_numColors -
_ceil -
Method Detail

setNumberOfColors

public void setNumberOfColors(int _numColors)
Sets the number of colors

Parameters:
_numColors -

getFloor

public double getFloor()

getCeiling

public double getCeiling()

setPaletteType

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

Parameters:
_paletteType -

checkPallet

public void checkPallet(java.awt.Color backgroundColor)
Checks to see if background color matches the color palette background.

Parameters:
backgroundColor -

setScale

public void setScale(double _ceil)
Sets the scale.

Parameters:
_ceil -

doubleToCompColor

public java.awt.Color doubleToCompColor(double mag)
Converts a double to a the complementary color.

Parameters:
mag -
Returns:
the color

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()

getLegendFrame

public javax.swing.JFrame getLegendFrame()

updateLegend

public void updateLegend()