Package Spectrogram

Class SpectrogramHidingPanel


public class SpectrogramHidingPanel extends HidingDialogComponent
Side panel for the spectrogram which allows users to quickly change spectrogram settings
Author:
Jamie Macaulay
  • Constructor Details

  • Method Details

    • changeAmplitudeParams

      public void changeAmplitudeParams(SpectrogramParameters spectrogramParams, Long millis)
    • changeFrequencyParams

      public void changeFrequencyParams(SpectrogramParameters spectrogramParams)
      Changes the spectrogram params and recalcs spectrogram data if necessary.
      Parameters:
      spectrogramParams -
    • setParams

      public void setParams(SpectrogramParameters spectrogramParams)
    • brighten

      public static Color brighten(Color color, int d)
    • getFrequencyRangeSlider

      public PamRangeSlider getFrequencyRangeSlider()
    • getName

      public String getName()
      Description copied from class: HidingDialogComponent
      A short name - gets used when multiple components need to be tabbed up.
      Specified by:
      getName in class HidingDialogComponent
      Returns:
    • getAbsMaxFrequency

      public double getAbsMaxFrequency()
      The max frequency of the slider range
      Returns:
    • getAbsMinFrequency

      public double getAbsMinFrequency()
      The min frequency of the slider range
      Returns:
    • getUpperFrequency

      public double getUpperFrequency()
      The currently selected max frequency of the slider.
      Returns:
    • getLowerFrequency

      public double getLowerFrequency()
      The currently selected min frequency of the slider.
      Returns:
    • setFrequencyAbsoluteRange

      public void setFrequencyAbsoluteRange(double min, double max)
    • setFrequencySliderRange

      public void setFrequencySliderRange(double minSliderFreq, double maxSliderFreq, double minFreq, double maxFreq)
      Set the slider frequecy range
      Parameters:
      minSliderFreq - - min frequency Hz of the slider thumbs
      maxSliderFreq - - max frequency Hz of the slider thumbs
      minFreq - - absolute min frequency Hz of the slider
      maxFreq - - absolute max frequency Hz of the slider
    • setAmplitudeSliderRange

      public void setAmplitudeSliderRange(double minSliderAmp, double maxSliderAmp, double minAmp, double maxAmp)
      Set the slider amplitude range
      Parameters:
      minSliderAmp - - min amplitude dB of the slider thumbs
      maxSliderAmp - - max amplitude dB of the slider thumbs
      minAmp - - absolute min amplitude dB of the slider
      maxAmp - - absolute max amplitude dB of the slider
    • setAmplitudeAbsoluteRange

      public void setAmplitudeAbsoluteRange(double min, double max)
    • getAmplRangeSlider

      public ColourRangeSlider getAmplRangeSlider()
    • getAbsMinAmplitude

      public double getAbsMinAmplitude()
      Get the absolute maximum of the slider bar in dB
      Returns:
      the absolute maximum of the slid3er bar in dB.
    • getAbsMaxAmplitude

      public double getAbsMaxAmplitude()
      Get the absolute maximum of the slider bar in dB
      Returns:
      the absolute maximum of the slid3er bar in dB.
    • getAmplitudeUpper

      public double getAmplitudeUpper()
      Get the upper slider thumb of the amplitude bar in dB
      Returns:
      upper thumb position in dB
    • getAmplitudeLower

      public double getAmplitudeLower()
      Get the lower thumb position for amplitude slider in dB
      Returns:
      lower thumb position in dB
    • getComponent

      public JComponent getComponent()
      Specified by:
      getComponent in class HidingDialogComponent
      Returns:
      component to show in the hiding dialog panel
    • canHide

      public boolean canHide()
      Description copied from class: HidingDialogComponent
      Can hide - generally this should return true if at all possible however you may need to stop it hiding if any controls are in an impossible state. This function also gives users an opportunity to check / use any dialog parameters.
      Specified by:
      canHide in class HidingDialogComponent
      Returns:
      true if the panel can be hidden.
    • showComponent

      public void showComponent(boolean visible)
      Description copied from class: HidingDialogComponent
      Called when the component is about to be set visible or hidden.
      Specified by:
      showComponent in class HidingDialogComponent
    • hasMore

      public boolean hasMore()
      Description copied from class: HidingDialogComponent
      Sliding dialog has more options. If this returns true a 'more' button will show next to the pin which can be used to open a more complex dialog.
      Overrides:
      hasMore in class HidingDialogComponent
      Returns:
      true if there are more options to show.
    • showMore

      public boolean showMore(HidingDialog hidingDialog)
      Description copied from class: HidingDialogComponent
      Get's called from the More button, which shows if hasMore is returning true. Can be used to show an evenmore exciting dialog.
      Overrides:
      showMore in class HidingDialogComponent
      Returns:
    • getIcon

      public Icon getIcon()
      Description copied from class: HidingDialogComponent
      A small icon around 18x18 pixels. This is used for tabs to allow users to quickly identify the control panel. Can be null if no symbol is needed
      Overrides:
      getIcon in class HidingDialogComponent