Class ClickPlotInfoFX

java.lang.Object
dataPlotsFX.data.TDDataInfoFX
dataPlotsFX.clickPlotFX.ClickPlotInfoFX

public class ClickPlotInfoFX extends TDDataInfoFX
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
  • Field Details

    • FFT_CLICK

      public static final int FFT_CLICK
      Draw a click as an FFT line wityh a cutoff energy percentage showing
      See Also:
    • STEM_CLICK_FREQ

      public static final int STEM_CLICK_FREQ
      DRaw a click on a stem plot coloured by mean frequency
      See Also:
  • Constructor Details

  • Method Details

    • shouldDraw

      public boolean shouldDraw(int plotNumber, PamDataUnit dataUnit)
      Description copied from class: TDDataInfoFX
      Do we want to draw this data unit on this plot ?
      Overrides:
      shouldDraw in class TDDataInfoFX
      Returns:
      true if unit should be drawn.
    • getDataValue

      public Double getDataValue(PamDataUnit pamDataUnit)
      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 class TDDataInfoFX
      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 class TDDataInfoFX
    • 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 class TDDataInfoFX
      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 class TDDataInfoFX
      Parameters:
      pamDataUnit - data unit to draw
      g - graphicsContext handle to draw on
      type - 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 class TDDataInfoFX
      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 class TDDataInfoFX
      Returns:
      the previous point on the display to draw from.
    • getSymbolChooser

      public TDSymbolChooserFX getSymbolChooser()
      Specified by:
      getSymbolChooser in class TDDataInfoFX
      Returns:
      a class containing functions to chose a symbol to plot.
    • getScaleInfo

      public TDScaleInfo getScaleInfo(boolean autoScale)
      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 class TDDataInfoFX
      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

      public TDScaleInfo getScaleInfo()
      Overrides:
      getScaleInfo in class TDDataInfoFX
      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 class TDDataInfoFX
    • hasOptions

      public boolean hasOptions()
      Description copied from class: TDDataInfoFX
      Has options that will result in a dialog.
      Overrides:
      hasOptions in class TDDataInfoFX
      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 class TDDataInfoFX
      Returns:
      true if options dialog OK button was pressed.
    • getStoredSettings

      public Serializable 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 class TDDataInfoFX
      Returns:
      serializable object to save.
    • setStoredSettings

      public boolean setStoredSettings(Serializable storedSettings)
      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 class TDDataInfoFX
      Returns:
      true if all OK.
    • getDisplayChannels

      public int getDisplayChannels()
    • setDisplayChannels

      public void setDisplayChannels(int displayChannels)
    • getGraphSettingsPane

      public TDSettingsPane getGraphSettingsPane()
      Description copied from class: TDDataInfoFX
      Return a hiding settings node which will get incorporated into a larger tabbed sliding pane.
      Overrides:
      getGraphSettingsPane in class TDDataInfoFX
      Returns:
      sliding dialog component.
    • updateSettings

      public void updateSettings()
      Called when settings have changed.
    • getClickControl

      public ClickControl getClickControl()
      Get the click control control.
      Returns:
      reference to the click control.
    • getClickDisplayParams

      public ClickDisplayParams getClickDisplayParams()
      Get the display paramters for clicks on a FX data plots.
      Returns:
      paramters for how clicks are displayed on FX data plots.
    • getAmpScaleInfo

      public TDScaleInfo 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 class TDDataInfoFX
      Parameters:
      oldValue - old value (seconds)
      newValue - new value (seconds)
    • getClickControlPane

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

      public ClickSymbolChooserFX getClickSymbolChooser()
      Get click symbol chooser.
      Returns:
      the click symbol chooser.
    • getClickDataSelector

      public DataSelector 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 class TDDataInfoFX
      Parameters:
      changeType - - the chnage type.
    • getMenuNodes

      public ArrayList<OverlayMenuItem> 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 class TDDataInfoFX
      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 class TDDataInfoFX
    • getClickFFTPlotManager

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

      public TDScaleInfo getRawScaleInfo()
      get the raw scale info. This handles plotting raw waveforms.
      Returns:
      the raw scale info.
    • getClickRawPlotManager

      public ClickRawPlotManager getClickRawPlotManager()
      The raw click manager. Handles plotting raw waveform data on the plot.
      Returns:
      thw raw click manager.