Package Spectrogram
Class SpectrogramHidingPanel
java.lang.Object
PamView.hidingpanel.HidingDialogComponent
Spectrogram.SpectrogramHidingPanel
Side panel for the spectrogram which allows users to quickly change spectrogram settings
- Author:
- Jamie Macaulay
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Color
boolean
canHide()
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.void
changeAmplitudeParams
(SpectrogramParameters spectrogramParams, Long millis) void
changeFrequencyParams
(SpectrogramParameters spectrogramParams) Changes the spectrogram params and recalcs spectrogram data if necessary.double
Get the absolute maximum of the slider bar in dBdouble
The max frequency of the slider rangedouble
Get the absolute maximum of the slider bar in dBdouble
The min frequency of the slider rangedouble
Get the lower thumb position for amplitude slider in dBdouble
Get the upper slider thumb of the amplitude bar in dBgetIcon()
A small icon around 18x18 pixels.double
The currently selected min frequency of the slider.getName()
A short name - gets used when multiple components need to be tabbed up.double
The currently selected max frequency of the slider.boolean
hasMore()
Sliding dialog has more options.void
setAmplitudeAbsoluteRange
(double min, double max) void
setAmplitudeSliderRange
(double minSliderAmp, double maxSliderAmp, double minAmp, double maxAmp) Set the slider amplitude rangevoid
setFrequencyAbsoluteRange
(double min, double max) void
setFrequencySliderRange
(double minSliderFreq, double maxSliderFreq, double minFreq, double maxFreq) Set the slider frequecy rangevoid
setParams
(SpectrogramParameters spectrogramParams) void
showComponent
(boolean visible) Called when the component is about to be set visible or hidden.boolean
showMore
(HidingDialog hidingDialog) Get's called from the More button, which shows if hasMore is returning true.Methods inherited from class PamView.hidingpanel.HidingDialogComponent
addChangeListener, notifyChangeListeners, removeChangeListener, repackDisplay
-
Constructor Details
-
SpectrogramHidingPanel
-
-
Method Details
-
changeAmplitudeParams
-
changeFrequencyParams
Changes the spectrogram params and recalcs spectrogram data if necessary.- Parameters:
spectrogramParams
-
-
setParams
-
brighten
-
getFrequencyRangeSlider
-
getName
Description copied from class:HidingDialogComponent
A short name - gets used when multiple components need to be tabbed up.- Specified by:
getName
in classHidingDialogComponent
- 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 thumbsmaxSliderFreq
- - max frequency Hz of the slider thumbsminFreq
- - absolute min frequency Hz of the slidermaxFreq
- - 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 thumbsmaxSliderAmp
- - max amplitude dB of the slider thumbsminAmp
- - absolute min amplitude dB of the slidermaxAmp
- - absolute max amplitude dB of the slider
-
setAmplitudeAbsoluteRange
public void setAmplitudeAbsoluteRange(double min, double max) -
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
- Specified by:
getComponent
in classHidingDialogComponent
- 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 classHidingDialogComponent
- 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 classHidingDialogComponent
-
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 classHidingDialogComponent
- Returns:
- true if there are more options to show.
-
showMore
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 classHidingDialogComponent
- Returns:
-
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 classHidingDialogComponent
-