Package fftManager.newSpectrogram
Class SpectrogramPlotInfo
java.lang.Object
dataPlots.data.TDDataInfo
fftManager.newSpectrogram.SpectrogramPlotInfo
- All Implemented Interfaces:
HidingDialogChangeListener
,SpectrogramParametersUser
public class SpectrogramPlotInfo
extends TDDataInfo
implements SpectrogramParametersUser, HidingDialogChangeListener
-
Field Summary
Fields inherited from class dataPlots.data.TDDataInfo
UNITS_ANGLE, UNITS_TEMPERATURE
Fields inherited from interface PamView.hidingpanel.HidingDialogChangeListener
MORE_DIALOG_CLOSED
-
Constructor Summary
ConstructorDescriptionSpectrogramPlotInfo
(TDDataProvider tdDataProvider, PamFFTControl fftControl, TDGraph tdGraph, PamDataBlock pamDataBlock) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dialogChanged
(int changeLevel, Object object) Notification from a sliding dialog panel when something changes.void
drawData
(int plotNumber, Graphics g, Rectangle windowRect, int orientation, PamAxis timeAxis, long scrollStart, PamAxis graphAxis) Paint data into the graphics window.boolean
editOptions
(Window frame) Edit options - generally involves throwing up a dialog of some sort.double[]
getColours
(double dBLevel) Get the colour triplet for a particular db value.getDataValue
(PamDataUnit pamDataUnit) Gets a value for a specific data unit which should be in the same units as the scale information.getFixedScaleInformation
(int orientation) Return a hiding dialog component which will get incorporated into a larger tabbed sliding dialog.getScaleInformation
(int orientation, boolean autoScale) Get an object that will be packed up with the serialised settings when information about a plot get's stored.boolean
Has options that will result in a dialog.void
newFFTData
(FFTDataUnit fftDataUnit) Called when new FFT data arrive.void
Called whenever a data line is removed from a graph, or when a graph is removed from a plot.void
setSpectrogramParameters
(SpectrogramParameters spectrogramParameters) boolean
setStoredSettings
(Serializable storedSettings) Set settings which have been read back from storage (the psf file).void
timeRangeSpinnerChange
(double oldValue, double newValue) Called when the time range spinner on the main display panel changes.void
timeScrollRangeChanged
(long minimumMillis, long maximumMillis) Called in viewer mode when the time scroll range moves.void
timeScrollValueChanged
(long valueMillis) Called in viewer mode when the time scroller moves.Methods inherited from class dataPlots.data.TDDataInfo
addDataUnits, clearDraw, drawDataUnit, drawHighLightData, getCurrentDataLine, getCurrentDataLineIndex, getDataBlock, getDataDimensions, getDataLineInfos, getDataName, getDataProvider, getShortName, getTdGraph, getToolTipText, hasAxisName, isShowing, notifyModelChanged, selectDataLine, setCurrentAxisName, setFixedScaleInformation, setShowing
-
Constructor Details
-
SpectrogramPlotInfo
public SpectrogramPlotInfo(TDDataProvider tdDataProvider, PamFFTControl fftControl, TDGraph tdGraph, PamDataBlock pamDataBlock)
-
-
Method Details
-
getHidingDialogComponent
Description copied from class:TDDataInfo
Return a hiding dialog component which will get incorporated into a larger tabbed sliding dialog.- Overrides:
getHidingDialogComponent
in classTDDataInfo
- Returns:
- sliding dialog component.
-
removeData
public void removeData()Description copied from class:TDDataInfo
Called whenever a data line is removed from a graph, or when a graph is removed from a plot.
Is a good opportunity for the DataInfo to unsubscribe itself from any datablocks it might be observing.- Overrides:
removeData
in classTDDataInfo
-
newFFTData
Called when new FFT data arrive.- Parameters:
fftDataUnit
-
-
getDataValue
Description copied from class:TDDataInfo
Gets a value for a specific data unit which should be in the same units as the scale information. This will then be converted into a plot position by the TDGraph.- Specified by:
getDataValue
in classTDDataInfo
- Returns:
- data value or null if this data poit should not be plotted.
-
getSymbolChooser
- Specified by:
getSymbolChooser
in classTDDataInfo
- Returns:
- a class containing functions to chose a symbol to plot.
-
drawData
public void drawData(int plotNumber, Graphics g, Rectangle windowRect, int orientation, PamAxis timeAxis, long scrollStart, PamAxis graphAxis) Description copied from class:TDDataInfo
Paint data into the graphics window.- Overrides:
drawData
in classTDDataInfo
- Parameters:
plotNumber
- plot numberg
- graphicswindowRect
- Window rectangle to draw inorientation
- orientationgraphAxis
- graph data axis for scaling.
-
hasOptions
public boolean hasOptions()Description copied from class:TDDataInfo
Has options that will result in a dialog.- Overrides:
hasOptions
in classTDDataInfo
- Returns:
- true if there are options.
-
editOptions
Description copied from class:TDDataInfo
Edit options - generally involves throwing up a dialog of some sort.- Overrides:
editOptions
in classTDDataInfo
- Returns:
- true if options dialog OK button was pressed.
-
getScaleInformation
- Overrides:
getScaleInformation
in classTDDataInfo
- Returns:
- Information about the scales of the data.
-
getFixedScaleInformation
- Overrides:
getFixedScaleInformation
in classTDDataInfo
- Returns:
- the fixedScaleInformation
-
getStoredSettings
Description copied from class:TDDataInfo
Get an object that will be packed up with the serialised settings when information about a plot get's stored.
The Object MUST implement serializable and ideally also cloneable or it will go belly up !
This only gets called when settings are to be saved so there is no need to keep parameters this returns up to date except right at settings save time (when this is called)- Overrides:
getStoredSettings
in classTDDataInfo
- Returns:
- serializable object to save.
-
setStoredSettings
Description copied from class:TDDataInfo
Set settings which have been read back from storage (the psf file). Assume these are of the right type and cast into whatever is needed !- Overrides:
setStoredSettings
in classTDDataInfo
- Returns:
- true if all OK.
-
getTdControl
- Returns:
- the tdControl
-
getFftDataBlock
- Returns:
- the fftDataBlock
-
getColours
public double[] getColours(double dBLevel) Get the colour triplet for a particular db value.- Parameters:
dBLevel
-- Returns:
- colour triplet.
-
getSpectrogramParameters
- Specified by:
getSpectrogramParameters
in interfaceSpectrogramParametersUser
-
setSpectrogramParameters
- Specified by:
setSpectrogramParameters
in interfaceSpectrogramParametersUser
-
getFFTDataBlock
- Specified by:
getFFTDataBlock
in interfaceSpectrogramParametersUser
-
timeScrollValueChanged
public void timeScrollValueChanged(long valueMillis) Description copied from class:TDDataInfo
Called in viewer mode when the time scroller moves.Most data won't need to do anything here since they are already subscribed to the scroller and will get their data loaded from psf automatically.
- Overrides:
timeScrollValueChanged
in classTDDataInfo
- Parameters:
valueMillis
- new scroll value in millis
-
timeScrollRangeChanged
public void timeScrollRangeChanged(long minimumMillis, long maximumMillis) Description copied from class:TDDataInfo
Called in viewer mode when the time scroll range moves.Most data won't need to do anything here since they are already subscribed to the scroller and will get their data loaded from psf automatically.
- Overrides:
timeScrollRangeChanged
in classTDDataInfo
- Parameters:
minimumMillis
- new minimum in millismaximumMillis
- new maximum in millis.
-
timeRangeSpinnerChange
public void timeRangeSpinnerChange(double oldValue, double newValue) Description copied from class:TDDataInfo
Called when the time range spinner on the main display panel changes.- Overrides:
timeRangeSpinnerChange
in classTDDataInfo
- Parameters:
oldValue
- old value (seconds)newValue
- new value (seconds)
-
dialogChanged
Description copied from interface:HidingDialogChangeListener
Notification from a sliding dialog panel when something changes.- Specified by:
dialogChanged
in interfaceHidingDialogChangeListener
- Parameters:
changeLevel
- quick way of indicating levels of change.-ve numbers are used by the system. +ve ones can be used by programmer in a dialog specific context.
object
- an object if you need to send other information.
-