Class VectorColorMapper

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

public class VectorColorMapper extends Object
  • Field Details

  • 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

      public void checkPallet(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 Color doubleToCompColor(double mag)
      Converts a double to a the complementary color.
      Parameters:
      mag -
      Returns:
      the color
    • doubleToColor

      public Color doubleToColor(double mag)
      Converts a double to a color.
      Parameters:
      mag -
      Returns:
      the color
    • showLegend

      public JFrame showLegend()
    • getLegendFrame

      public JFrame getLegendFrame()
    • updateLegend

      public void updateLegend()