Package detectionPlotFX.data
Class DDDataInfo<T extends PamDataUnit>
java.lang.Object
detectionPlotFX.data.DDDataInfo<T>
- Record Components:
T
- the type of data unit
- Direct Known Subclasses:
ClickTrainDDataInfo
,CPODDDDataInfo
,MTClassifierPane.TemplateDDDataInfo
,OverlayGroupDisplay.RawSpecDDInfo
,RawDDDataInfo
,RawDLDDDataInfo
,SpecCorrelationPane.TemplateDDDataInfo
,TemplateSpectrumPane.TemplateDDDataInfo
,WhistleDDInfo
Information on the data a detection can display. This essentially is a wrapper for a data block which allows
the individual pamDataUnits of the data block to be displayed in the detection display.
- Author:
- Jamie Macaulay
-
Constructor Summary
ConstructorDescriptionDDDataInfo
(DetectionPlotDisplay dDPlot, float sampleRate) Create the DDDataInfoDDDataInfo
(DetectionPlotDisplay dDPlot, PamDataBlock pamDataBlock) Create the DDdata info wothout reference to a provider -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDetectionPlot
(DetectionPlot<?> detectionPlot) Add a type of data unit to the list.void
drawData
(javafx.scene.canvas.GraphicsContext g, javafx.scene.shape.Rectangle windowRect, DetectionPlotProjector projector, T pamDataUnit) Paint data into the graphics window.void
drawData
(javafx.scene.canvas.GraphicsContext g, javafx.scene.shape.Rectangle windowRect, DetectionPlotProjector projector, T pamDataUnit, int flag) Paint data into the graphics window.Get the currently selected detection plot for the data unitGet the data block for this informationGet the scale information.getDetectionPlot
(int i) Get a detection plotint
The number of possible detection plots for the data unit.Get the detection plot displayfloat
Get the sample rate.Get the settings pane for this DDDataInfo.void
setCurrentDetectionPlot
(int index) void
Set the current plot to be shown.boolean
setCurrentDetectionPlot
(String plotName) Set the current plot to be shown based on the detections plot namevoid
setHardSampleRate
(float hardSampleRate) Set the sample rate.void
setupAxis
(DetectionPlotProjector projector, T pamDataUnit)
-
Constructor Details
-
DDDataInfo
Create the DDDataInfo- Parameters:
dDPlot
- - the dBPLotsampleRate
- - the samplerate.dDDataProvider
- - the dataplot provider
-
DDDataInfo
Create the DDdata info wothout reference to a provider- Parameters:
dDPlot
- - - the data plotpamDataBlock
- - the parent datablopck
-
-
Method Details
-
getDataBlock
Get the data block for this information- Returns:
- the datablock. This can be null.
-
getHardSampleRate
public float getHardSampleRate()Get the sample rate. This is acquired form the datablock if one exists. Otherwise a hard wired sample rate is used.- Returns:
- the sample rate.
-
setHardSampleRate
public void setHardSampleRate(float hardSampleRate) Set the sample rate. This is only used if the parent data block is null. -
addDetectionPlot
Add a type of data unit to the list.- Parameters:
unitType
- String name of the data unit.
-
getDetectionPlot
Get a detection plot- Parameters:
the
- index of the detection plot to get.
-
getDetectionPlotCount
public int getDetectionPlotCount()The number of possible detection plots for the data unit. -
getDDScaleInfo
Get the scale information. This holds the min and max values for the x and y axis along with other axis related parameters. -
getDetectionPlotDisplay
Get the detection plot display- Returns:
- the detection plot display.
-
setCurrentDetectionPlot
public void setCurrentDetectionPlot(int index) -
setCurrentDetectionPlot
Set the current plot to be shown.- Parameters:
plot
- the plot to show.
-
setCurrentDetectionPlot
Set the current plot to be shown based on the detections plot name- Parameters:
the
- name of the plot to showtrue
- if the plot was set - otherwise false (i.e. if the name was wrong)
-
getCurrentDetectionPlot
Get the currently selected detection plot for the data unit- Returns:
- the current detection plot or null if no detection plot is selected.
-
getSettingsPane
Get the settings pane for this DDDataInfo. This holds plot specific settings.- Returns:
-
drawData
public void drawData(javafx.scene.canvas.GraphicsContext g, javafx.scene.shape.Rectangle windowRect, DetectionPlotProjector projector, T pamDataUnit, int flag) Paint data into the graphics window.- Parameters:
g
- the graphics handle for drawing on.windowRect
- Window rectangle to draw inpamAxis
- scroll start time in millisecondsgraphAxis
- all the axis of the graph. Some may be invisible. Order is TOP, RIGHT, BOTTOM (x axis), LEFT (y axis)newDataUnit
- - the data unit to plot.a
- flag with extra information - e.g. if this is a scroll bar paint or not.
-
drawData
public void drawData(javafx.scene.canvas.GraphicsContext g, javafx.scene.shape.Rectangle windowRect, DetectionPlotProjector projector, T pamDataUnit) Paint data into the graphics window.- Parameters:
g
- the graphics handle for drawing on.windowRect
- Window rectangle to draw inpamAxis
- scroll start time in millisecondsgraphAxis
- all the axis of the graph. Some may be invisible. Order is TOP, RIGHT, BOTTOM (x axis), LEFT (y axis)newDataUnit
- - the data unit to plot.
-
setupAxis
-