Class RangeSpinner

java.lang.Object
pamScrollSystem.RangeSpinner
All Implemented Interfaces:
PamScrollObserver

public class RangeSpinner extends Object implements PamScrollObserver
Spinner control used to set display ranges which can be added to a PamScroller.
Author:
Doug
  • Constructor Details

    • RangeSpinner

      public RangeSpinner()
  • Method Details

    • setTimeRanges

      public void setTimeRanges(double[] timeRanges)
    • addSpecialTimeRange

      public void addSpecialTimeRange(double specialRange)
      Add a single special time range, e.g. the length of a spectrogram display based on pixels
      Parameters:
      specialRange - special range.
    • addSpecialTimeRange

      public void addSpecialTimeRange(double[] specialRanges)
      Add some special time ranges, e.g. the length of a spectrogram display based on pixels
      Parameters:
      specialRanges - list of special ranges.
    • setEnabled

      public void setEnabled(boolean e)
      Enable the controls
      Parameters:
      e - enable
    • getEnabled

      public boolean getEnabled()
      Determines whether or not the spinner is enabled
      Returns:
      true if enabled
    • getComponent

      public JPanel getComponent()
    • getDefaultValue

      public double getDefaultValue()
      Returns:
      the defaultValue
    • setDefaultValue

      public void setDefaultValue(double defaultValue)
      Parameters:
      defaultValue - the defaultValue to set
    • getSpinnerValue

      public double getSpinnerValue()
      Returns:
      the spinnerValue in seconds
    • setSpinnerValue

      public void setSpinnerValue(double spinnerValue)
      Parameters:
      spinnerValue - the spinnerValue to set in seconds
    • addRangeSpinnerListener

      public void addRangeSpinnerListener(RangeSpinnerListener rangeSpinnerListener)
      Add a range spinner listener.
      Parameters:
      rangeSpinnerListener -
    • removeRangeSpinnerListener

      public void removeRangeSpinnerListener(RangeSpinnerListener rangeSpinnerListener)
      Remove a range spinner listener.
      Parameters:
      rangeSpinnerListener -
    • getMaxValue

      public double getMaxValue()
      Returns:
      the maxValue
    • setMaxValue

      public void setMaxValue(double maxValue)
      Parameters:
      maxValue - the maxValue to set
    • scrollRangeChanged

      public void scrollRangeChanged(AbstractPamScroller pamScroller)
      Description copied from interface: PamScrollObserver
      Notification sent when a scroller or slider changes it's data range

      If data were loaded in a worker thread, this notification is sent after the new data have loaded.

      Specified by:
      scrollRangeChanged in interface PamScrollObserver
      Parameters:
      pamScroller - reference to moved scroller.
    • scrollValueChanged

      public void scrollValueChanged(AbstractPamScroller pamScroller)
      Description copied from interface: PamScrollObserver
      Notification sent when a scroller or slider changes it's position
      Specified by:
      scrollValueChanged in interface PamScrollObserver
      Parameters:
      pamScroller - reference to moved scroller