Package org.opensourcephysics.display2d
Class VectorColorMapper
java.lang.Object
org.opensourcephysics.display2d.VectorColorMapper
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVectorColorMapper
(int _numColors, double _ceil) Constructor VectorColorMapper -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkPallet
(Color backgroundColor) Checks to see if background color matches the color palette background.doubleToColor
(double mag) Converts a double to a color.doubleToCompColor
(double mag) Converts a double to a the complementary color.double
double
getFloor()
void
setNumberOfColors
(int _numColors) Sets the number of colorsvoid
setPaletteType
(int _paletteType) Sets the color palette.void
setScale
(double _ceil) Sets the scale.void
-
Field Details
-
SPECTRUM
public static final int SPECTRUM- See Also:
-
RED
public static final int RED- See Also:
-
BLUE
public static final int BLUE- See Also:
-
GREEN
public static final int GREEN- See Also:
-
GRAY
public static final int GRAY- See Also:
-
BLACK
public static final int BLACK- See Also:
-
-
Constructor Details
-
VectorColorMapper
public VectorColorMapper(int _numColors, double _ceil) Constructor VectorColorMapper- Parameters:
_numColors
-_ceil
-
-
-
Method Details
-
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
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
Converts a double to a the complementary color.- Parameters:
mag
-- Returns:
- the color
-
doubleToColor
Converts a double to a color.- Parameters:
mag
-- Returns:
- the color
-
showLegend
-
getLegendFrame
-
updateLegend
public void updateLegend()
-