Class CutChooser

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class CutChooser extends JPanel
Widget for selecting lower and upper percentiles for image display. This is currently implemented as two adjacent horizontal sliders with logarithmic scales, one going from near zero to 0.5, and the other from 0.5 to near 1.
Since:
2 Dec 2005
Author:
Mark Taylor
See Also:
  • Constructor Details

    • CutChooser

      public CutChooser()
      Constructor.
  • Method Details

    • setLowValue

      public void setLowValue(double val)
      Sets the lower cut value.
      Parameters:
      val - value (coerced to between minimum and 0.5)
    • setHighValue

      public void setHighValue(double val)
      Sets the upper cut value
      Parameters:
      val - value (coerced to between 0.5 and maximum)
    • addChangeListener

      public void addChangeListener(ChangeListener listener)
      Adds a listener which will be notified when the cut levels have changed (but not while they are changing).
      Parameters:
      listener - listener to add
    • removeChangeListener

      public void removeChangeListener(ChangeListener listener)
      Removes a listener added by addChangeListener.
      Parameters:
      listener - listener to remove
    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • getLowValue

      public double getLowValue()
      Returns the lower value specified by this component.
      Returns:
      low cut value; 0<=val<=1 and val<=getHighValue()
    • getHighValue

      public double getHighValue()
      Returns the upper value specified by this component.
      Returns:
      high cut value; 0<=val<=1 and val>=getLowValue()