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
FieldsFields inherited from class dataPlots.data.TDDataInfo
UNITS_ANGLE, UNITS_TEMPERATUREFields inherited from interface PamView.hidingpanel.HidingDialogChangeListener
MORE_DIALOG_CLOSED - 
Constructor Summary
ConstructorsConstructorDescriptionSpectrogramPlotInfo(TDDataProvider tdDataProvider, PamFFTControl fftControl, TDGraph tdGraph, PamDataBlock pamDataBlock)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidCreate the colour arrays to use in the plots.voiddialogChanged(int changeLevel, Object object) Notification from a sliding dialog panel when something changes.voiddrawData(int plotNumber, Graphics g, Rectangle windowRect, int orientation, PamAxis timeAxis, long scrollStart, PamAxis graphAxis) Paint data into the graphics window.booleaneditOptions(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.booleanHas options that will result in a dialog.voidnewFFTData(FFTDataUnit fftDataUnit) Called when new FFT data arrive.voidCalled whenever a data line is removed from a graph, or when a graph is removed from a plot.voidsetSpectrogramParameters(SpectrogramParameters spectrogramParameters) booleansetStoredSettings(Serializable storedSettings) Set settings which have been read back from storage (the psf file).voidtimeRangeSpinnerChange(double oldValue, double newValue) Called when the time range spinner on the main display panel changes.voidtimeScrollRangeChanged(long minimumMillis, long maximumMillis) Called in viewer mode when the time scroll range moves.voidtimeScrollValueChanged(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, getPamDataBlock, getShortName, getTdDataProvider, getTdGraph, getToolTipText, hasAxisName, isShowing, isViewer, notifyModelChanged, selectDataLine, setCurrentAxisName, setFixedScaleInformation, setShowing 
- 
Field Details
- 
freqBinRange
protected int[] freqBinRange 
 - 
 - 
Constructor Details
- 
SpectrogramPlotInfo
public SpectrogramPlotInfo(TDDataProvider tdDataProvider, PamFFTControl fftControl, TDGraph tdGraph, PamDataBlock pamDataBlock)  
 - 
 - 
Method Details
- 
getHidingDialogComponent
Description copied from class:TDDataInfoReturn a hiding dialog component which will get incorporated into a larger tabbed sliding dialog.- Overrides:
 getHidingDialogComponentin classTDDataInfo- Returns:
 - sliding dialog component.
 
 - 
removeData
public void removeData()Description copied from class:TDDataInfoCalled 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:
 removeDatain classTDDataInfo
 - 
newFFTData
Called when new FFT data arrive.- Parameters:
 fftDataUnit-
 - 
getDataValue
Description copied from class:TDDataInfoGets 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:
 getDataValuein classTDDataInfo- Parameters:
 pamDataUnit-- Returns:
 - data value or null if this data poit should not be plotted.
 
 - 
getSymbolChooser
- Specified by:
 getSymbolChooserin 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:TDDataInfoPaint data into the graphics window.- Overrides:
 drawDatain 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:TDDataInfoHas options that will result in a dialog.- Overrides:
 hasOptionsin classTDDataInfo- Returns:
 - true if there are options.
 
 - 
editOptions
Description copied from class:TDDataInfoEdit options - generally involves throwing up a dialog of some sort.- Overrides:
 editOptionsin classTDDataInfo- Returns:
 - true if options dialog OK button was pressed.
 
 - 
getScaleInformation
- Overrides:
 getScaleInformationin classTDDataInfo- Parameters:
 orientation-- Returns:
 - Information about the scales of the data.
 
 - 
getFixedScaleInformation
- Overrides:
 getFixedScaleInformationin classTDDataInfo- Returns:
 - the fixedScaleInformation
 
 - 
getStoredSettings
Description copied from class:TDDataInfoGet 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:
 getStoredSettingsin classTDDataInfo- Returns:
 - serializable object to save.
 
 - 
setStoredSettings
Description copied from class:TDDataInfoSet 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:
 setStoredSettingsin classTDDataInfo- Parameters:
 storedSettings-- Returns:
 - true if all OK.
 
 - 
getTdControl
- Returns:
 - the tdControl
 
 - 
getFftDataBlock
- Returns:
 - the fftDataBlock
 
 - 
createColours
protected void createColours()Create the colour arrays to use in the plots. - 
getColours
public double[] getColours(double dBLevel) Get the colour triplet for a particular db value.- Parameters:
 dBLevel-- Returns:
 - colour triplet.
 
 - 
getSpectrogramParameters
- Specified by:
 getSpectrogramParametersin interfaceSpectrogramParametersUser
 - 
setSpectrogramParameters
- Specified by:
 setSpectrogramParametersin interfaceSpectrogramParametersUser
 - 
getFFTDataBlock
- Specified by:
 getFFTDataBlockin interfaceSpectrogramParametersUser
 - 
timeScrollValueChanged
public void timeScrollValueChanged(long valueMillis) Description copied from class:TDDataInfoCalled 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:
 timeScrollValueChangedin classTDDataInfo- Parameters:
 valueMillis- new scroll value in millis
 - 
timeScrollRangeChanged
public void timeScrollRangeChanged(long minimumMillis, long maximumMillis) Description copied from class:TDDataInfoCalled 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:
 timeScrollRangeChangedin classTDDataInfo- Parameters:
 minimumMillis- new minimum in millismaximumMillis- new maximum in millis.
 - 
timeRangeSpinnerChange
public void timeRangeSpinnerChange(double oldValue, double newValue) Description copied from class:TDDataInfoCalled when the time range spinner on the main display panel changes.- Overrides:
 timeRangeSpinnerChangein classTDDataInfo- Parameters:
 oldValue- old value (seconds)newValue- new value (seconds)
 - 
dialogChanged
Description copied from interface:HidingDialogChangeListenerNotification from a sliding dialog panel when something changes.- Specified by:
 dialogChangedin 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.
 
 -