public class SpectrogramHidingPanel extends HidingDialogComponent
Constructor and Description |
---|
SpectrogramHidingPanel(SpectrogramParametersUser spectrogramDisplay) |
Modifier and Type | Method and Description |
---|---|
static java.awt.Color |
brighten(java.awt.Color color,
int d) |
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,
java.lang.Long millis) |
void |
changeFrequencyParams(SpectrogramParameters spectrogramParams)
Changes the spectrogram params and recalcs spectrogram data if necessary.
|
double |
getAbsMaxAmplitude()
Get the absolute minimum of the slider bar in dB
|
double |
getAbsMaxFrequency()
The max frequency of the slider range
|
double |
getAbsMinAmplitude()
Get the absolute maximum of the slider bar in dB
|
double |
getAbsMinFrequency()
The min frequency of the slider range
|
double |
getAmplitudeLower()
Get the lower thumb position for amplitude slider in dB
|
double |
getAmplitudeUpper()
Get the upper slider thumb of the amplitude bar in dB
|
ColourRangeSlider |
getAmplRangeSlider() |
javax.swing.JComponent |
getComponent() |
PamRangeSlider |
getFrequencyRangeSlider() |
javax.swing.Icon |
getIcon()
A small icon around 18x18 pixels.
|
double |
getLowerFrequency()
The currently selected min frequency of the slider.
|
java.lang.String |
getName()
A short name - gets used when multiple components need to be tabbed up.
|
double |
getUpperFrequency()
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 range
|
void |
setFrequencyAbsoluteRange(double min,
double max) |
void |
setFrequencySliderRange(double minSliderFreq,
double maxSliderFreq,
double minFreq,
double maxFreq)
Set the slider frequecy range
|
void |
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.
|
addChangeListener, notifyChangeListeners, removeChangeListener, repackDisplay
public SpectrogramHidingPanel(SpectrogramParametersUser spectrogramDisplay)
public void changeAmplitudeParams(SpectrogramParameters spectrogramParams, java.lang.Long millis)
public void changeFrequencyParams(SpectrogramParameters spectrogramParams)
spectrogramParams
- public void setParams(SpectrogramParameters spectrogramParams)
public static java.awt.Color brighten(java.awt.Color color, int d)
public PamRangeSlider getFrequencyRangeSlider()
public java.lang.String getName()
HidingDialogComponent
getName
in class HidingDialogComponent
public double getAbsMaxFrequency()
public double getAbsMinFrequency()
public double getUpperFrequency()
public double getLowerFrequency()
public void setFrequencyAbsoluteRange(double min, double max)
public void setFrequencySliderRange(double minSliderFreq, double maxSliderFreq, double minFreq, double maxFreq)
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 sliderpublic void setAmplitudeSliderRange(double minSliderAmp, double maxSliderAmp, double minAmp, double maxAmp)
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 sliderpublic void setAmplitudeAbsoluteRange(double min, double max)
public ColourRangeSlider getAmplRangeSlider()
public double getAbsMinAmplitude()
public double getAbsMaxAmplitude()
public double getAmplitudeUpper()
public double getAmplitudeLower()
public javax.swing.JComponent getComponent()
getComponent
in class HidingDialogComponent
public boolean canHide()
HidingDialogComponent
canHide
in class HidingDialogComponent
public void showComponent(boolean visible)
HidingDialogComponent
showComponent
in class HidingDialogComponent
public boolean hasMore()
HidingDialogComponent
hasMore
in class HidingDialogComponent
public boolean showMore(HidingDialog hidingDialog)
HidingDialogComponent
showMore
in class HidingDialogComponent
public javax.swing.Icon getIcon()
HidingDialogComponent
getIcon
in class HidingDialogComponent