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

public abstract class DDDataInfo<T extends PamDataUnit> extends Object
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 Details

    • DDDataInfo

      public DDDataInfo(DetectionPlotDisplay dDPlot, float sampleRate)
      Create the DDDataInfo
      Parameters:
      dDPlot - - the dBPLot
      sampleRate - - the samplerate.
      dDDataProvider - - the dataplot provider
    • DDDataInfo

      public DDDataInfo(DetectionPlotDisplay dDPlot, PamDataBlock pamDataBlock)
      Create the DDdata info wothout reference to a provider
      Parameters:
      dDPlot - - - the data plot
      pamDataBlock - - the parent datablopck
  • Method Details

    • getDataBlock

      public PamDataBlock 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

      public void addDetectionPlot(DetectionPlot<?> detectionPlot)
      Add a type of data unit to the list.
      Parameters:
      unitType - String name of the data unit.
    • getDetectionPlot

      public DetectionPlot<?> getDetectionPlot(int i)
      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

      public DDScaleInfo 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

      public DetectionPlotDisplay getDetectionPlotDisplay()
      Get the detection plot display
      Returns:
      the detection plot display.
    • setCurrentDetectionPlot

      public void setCurrentDetectionPlot(int index)
    • setCurrentDetectionPlot

      public void setCurrentDetectionPlot(DetectionPlot plot)
      Set the current plot to be shown.
      Parameters:
      plot - the plot to show.
    • setCurrentDetectionPlot

      public boolean setCurrentDetectionPlot(String plotName)
      Set the current plot to be shown based on the detections plot name
      Parameters:
      the - name of the plot to show
      true - if the plot was set - otherwise false (i.e. if the name was wrong)
    • getCurrentDetectionPlot

      public DetectionPlot 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

      public PamBorderPane 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 in
      pamAxis - scroll start time in milliseconds
      graphAxis - 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 in
      pamAxis - scroll start time in milliseconds
      graphAxis - 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

      public void setupAxis(DetectionPlotProjector projector, T pamDataUnit)