Package dataPlotsFX.clickPlotFX
Class ClickPlotInfoFX
java.lang.Object
dataPlotsFX.data.TDDataInfoFX
dataPlotsFX.clickPlotFX.ClickPlotInfoFX
Handles the plotting of click data in the TDDisplayFX. Clicks can be plotted
in relatively standard ways on bearing time, amplitude time etc. They are
also plotted as stem plots to replicate the look of CPOD.exe (credit where
credit is due) and on a spectrogram showing FFT.
- Author:
- Jamie Macaulay
-
Nested Class Summary
Nested classes/interfaces inherited from class dataPlotsFX.data.TDDataInfoFX
TDDataInfoFX.DataLoadObserver
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Draw a click as an FFT line wityh a cutoff energy percentage showingstatic final int
DRaw a click on a stem plot coloured by mean frequencyFields inherited from class dataPlotsFX.data.TDDataInfoFX
dataPlugIns, scaleInfoIndex
-
Constructor Summary
ConstructorDescriptionClickPlotInfoFX
(TDDataProviderFX tdDataProvider, ClickControl clickControl, TDGraphFX tdGraph, PamDataBlock pamDataBlock) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear any residual drawing objects that get held between calls, e.g.void
drawAllDataUnits
(int plotNumber, javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector) Paint individual data units in the graphics window.javafx.scene.shape.Polygon
drawDataUnit
(int plotNumber, PamDataUnit pamDataUnit, javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector, int type) Draw a data unit.void
drawHighLightData
(int plotNumber, javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector) Draw highlighted data.boolean
Edit options - generally involves throwing up a dialog of some sort.Get the TDScale information for amplitude axis.Get the click control control.Get the settingsa pane for the clicks on the display.Get the data selector for clicks.Get the display paramters for clicks on a FX data plots.Get the plot manager for plotting FFT data.The raw click manager.Get click symbol chooser.getDataValue
(PamDataUnit pamDataUnit) Gets a value for a specific data unit which should be in the same units as the scale information.int
Return a hiding settings node which will get incorporated into a larger tabbed sliding pane.Get TD specific menu items which are added to pop up menus if a data unit or data unit within a selected group of data units belongs to the data info.javafx.geometry.Point2D
getPreviousDataUnit
(TDProjectorFX generalProjector, PamDataUnit pamDataUnit) Get the previous data unit for drawing a line from.get the raw scale info.getScaleInfo
(boolean autoScale) Get scale information based on the min max values of units in the data block or fixed scale informationGet 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
lastUnitDrawn
(javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector, int plotnumber) Indicates that the last data unit has been drawn.void
notifyChange
(int changeType) Notify of changes from PamController.boolean
setCurrentAxisName
(GeneralProjector.ParameterType dataType, GeneralProjector.ParameterUnits dataUnits) Set the current data units - this is an enum which matches an enum in dataLineInfos() or all will go horribly wrong.void
setDisplayChannels
(int displayChannels) boolean
setStoredSettings
(Serializable storedSettings) Set settings which have been read back from storage (the psf file).boolean
shouldDraw
(int plotNumber, PamDataUnit dataUnit) Do we want to draw this data unit on this plot ?void
timeRangeSpinnerChange
(double oldValue, double newValue) Called when the time range spinner on the main display panel changes.void
Called when settings have changed.Methods inherited from class dataPlotsFX.data.TDDataInfoFX
addScaleInfo, drawData, getCurrentScaleInfo, getDataBlock, getDataDimensions, getDataName, getDataObserver, getDataProvider, getDDataProvider, getDisplayColType, getLastDrawPoints, getMasterClockOverride, getRequiredDataHistory, getScaleInfoIndex, getScaleInfos, getShortName, getSourceDataBlock, getTDGraph, getToolTipText, hasAxisName, isPaused, isScrollChanging, isShowing, isViewer, removeData, removeScaleInfo, selectScaleInfo, setNPlotPanes, setShowing, shouldDraw, timeScrollRangeChanged, timeScrollValueChanged
-
Field Details
-
FFT_CLICK
public static final int FFT_CLICKDraw a click as an FFT line wityh a cutoff energy percentage showing- See Also:
-
STEM_CLICK_FREQ
public static final int STEM_CLICK_FREQDRaw a click on a stem plot coloured by mean frequency- See Also:
-
-
Constructor Details
-
ClickPlotInfoFX
public ClickPlotInfoFX(TDDataProviderFX tdDataProvider, ClickControl clickControl, TDGraphFX tdGraph, PamDataBlock pamDataBlock)
-
-
Method Details
-
shouldDraw
Description copied from class:TDDataInfoFX
Do we want to draw this data unit on this plot ?- Overrides:
shouldDraw
in classTDDataInfoFX
- Returns:
- true if unit should be drawn.
-
getDataValue
Description copied from class:TDDataInfoFX
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 classTDDataInfoFX
- Returns:
- data value or null if this data point should not be plotted.
-
drawHighLightData
public void drawHighLightData(int plotNumber, javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector) Description copied from class:TDDataInfoFX
Draw highlighted data.- Overrides:
drawHighLightData
in classTDDataInfoFX
-
drawAllDataUnits
public void drawAllDataUnits(int plotNumber, javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector) Description copied from class:TDDataInfoFX
Paint individual data units in the graphics window.Note the scroll start is a double instead of a long. The maximum time value for a double is 17 August 292278994 at 07:12:55 UTC. If PAMGuard is going by then soomeone else can sort out timing.
- Overrides:
drawAllDataUnits
in classTDDataInfoFX
- Parameters:
plotNumber
- - plot number i.e. which subplot the data should be drawn on.g
- - the graphics handle.scrollStart
- - the start of the display in milliseconds. Note that this is a double value.tdProjector
- - the projector which handles unit to pixel conversion.
-
drawDataUnit
public javafx.scene.shape.Polygon drawDataUnit(int plotNumber, PamDataUnit pamDataUnit, javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector, int type) Description copied from class:TDDataInfoFX
Draw a data unit.- Overrides:
drawDataUnit
in classTDDataInfoFX
- Parameters:
pamDataUnit
- data unit to drawg
- graphicsContext handle to draw ontype
- flag for which type of symbol to draw. e.g normal or highlighted.- Returns:
- polygon of area drawn on.
-
lastUnitDrawn
public void lastUnitDrawn(javafx.scene.canvas.GraphicsContext g, double scrollStart, TDProjectorFX tdProjector, int plotnumber) Description copied from class:TDDataInfoFX
Indicates that the last data unit has been drawn. This can be useful in TDDataInfo's which have more bespoke drawing mechanisms.- Overrides:
lastUnitDrawn
in classTDDataInfoFX
- Parameters:
plotnumber
- - plot number i.e. which sub plot the data should be drawn on.
-
getPreviousDataUnit
public javafx.geometry.Point2D getPreviousDataUnit(TDProjectorFX generalProjector, PamDataUnit pamDataUnit) Description copied from class:TDDataInfoFX
Get the previous data unit for drawing a line from. This can be overriden for data units.- Overrides:
getPreviousDataUnit
in classTDDataInfoFX
- Returns:
- the previous point on the display to draw from.
-
getSymbolChooser
- Specified by:
getSymbolChooser
in classTDDataInfoFX
- Returns:
- a class containing functions to chose a symbol to plot.
-
getScaleInfo
Description copied from class:TDDataInfoFX
Get scale information based on the min max values of units in the data block or fixed scale information- Overrides:
getScaleInfo
in classTDDataInfoFX
- Parameters:
autoScale
- . Create a scale information which is based on min/max value of data units in data block. False to use fixed scale information.- Returns:
- Information about the scales of the data.
-
getScaleInfo
- Overrides:
getScaleInfo
in classTDDataInfoFX
- Returns:
- the fixedScaleInformation
-
clearDraw
public void clearDraw()Description copied from class:TDDataInfoFX
Clear any residual drawing objects that get held between calls, e.g. the point of the previous unit plotted which may have been held so that lines can be drawn between points.- Overrides:
clearDraw
in classTDDataInfoFX
-
hasOptions
public boolean hasOptions()Description copied from class:TDDataInfoFX
Has options that will result in a dialog.- Overrides:
hasOptions
in classTDDataInfoFX
- Returns:
- true if there are options.
-
editOptions
public boolean editOptions()Description copied from class:TDDataInfoFX
Edit options - generally involves throwing up a dialog of some sort.- Overrides:
editOptions
in classTDDataInfoFX
- Returns:
- true if options dialog OK button was pressed.
-
getStoredSettings
Description copied from class:TDDataInfoFX
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 classTDDataInfoFX
- Returns:
- serializable object to save.
-
setStoredSettings
Description copied from class:TDDataInfoFX
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 classTDDataInfoFX
- Returns:
- true if all OK.
-
getDisplayChannels
public int getDisplayChannels() -
setDisplayChannels
public void setDisplayChannels(int displayChannels) -
getGraphSettingsPane
Description copied from class:TDDataInfoFX
Return a hiding settings node which will get incorporated into a larger tabbed sliding pane.- Overrides:
getGraphSettingsPane
in classTDDataInfoFX
- Returns:
- sliding dialog component.
-
updateSettings
public void updateSettings()Called when settings have changed. -
getClickControl
Get the click control control.- Returns:
- reference to the click control.
-
getClickDisplayParams
Get the display paramters for clicks on a FX data plots.- Returns:
- paramters for how clicks are displayed on FX data plots.
-
getAmpScaleInfo
Get the TDScale information for amplitude axis.- Returns:
- tdscaleinformation for amplitude axis
-
timeRangeSpinnerChange
public void timeRangeSpinnerChange(double oldValue, double newValue) Called when the time range spinner on the main display panel changes.- Overrides:
timeRangeSpinnerChange
in classTDDataInfoFX
- Parameters:
oldValue
- old value (seconds)newValue
- new value (seconds)
-
getClickControlPane
Get the settingsa pane for the clicks on the display. This holds controls to change symbols and data etc.- Returns:
- the click settings pane.
-
getClickSymbolChooser
Get click symbol chooser.- Returns:
- the click symbol chooser.
-
getClickDataSelector
Get the data selector for clicks. This handles plotting clicks of different species- Returns:
- the data selector.
-
notifyChange
public void notifyChange(int changeType) Description copied from class:TDDataInfoFX
Notify of changes from PamController.- Overrides:
notifyChange
in classTDDataInfoFX
- Parameters:
changeType
- - the chnage type.
-
getMenuNodes
Description copied from class:TDDataInfoFX
Get TD specific menu items which are added to pop up menus if a data unit or data unit within a selected group of data units belongs to the data info.- Overrides:
getMenuNodes
in classTDDataInfoFX
- Returns:
- a list of data info specific menu items to add.
-
setCurrentAxisName
public boolean setCurrentAxisName(GeneralProjector.ParameterType dataType, GeneralProjector.ParameterUnits dataUnits) Description copied from class:TDDataInfoFX
Set the current data units - this is an enum which matches an enum in dataLineInfos() or all will go horribly wrong.- Overrides:
setCurrentAxisName
in classTDDataInfoFX
-
getClickFFTPlotManager
Get the plot manager for plotting FFT data. THis handles plotting the FFT's of clicks on time/frequency displays...- Returns:
- The FFT plot manager.
-
getRawScaleInfo
get the raw scale info. This handles plotting raw waveforms.- Returns:
- the raw scale info.
-
getClickRawPlotManager
The raw click manager. Handles plotting raw waveform data on the plot.- Returns:
- thw raw click manager.
-