Package clickDetector

Class ClickBTDisplay

All Implemented Interfaces:
PamSettings, SettingsNameProvider, PamObserver, SymbolUpdateMonitor

public class ClickBTDisplay extends ClickDisplay implements PamObserver, PamSettings, SymbolUpdateMonitor
This is the main bearing time display for the click detector.
Author:
Doug Gillespie
  • Field Details Link icon

    • btPlot Link icon

      protected clickDetector.ClickBTDisplay.BTPlot btPlot
    • cursorLabel Link icon

      public PamLabel cursorLabel
    • rangeSpinner Link icon

      public RangeSpinner rangeSpinner
    • symbolChooser Link icon

      public ClickDetSymbolChooser symbolChooser
  • Constructor Details Link icon

    • ClickBTDisplay Link icon

      public ClickBTDisplay(ClickControl clickControl, ClickDisplayManager clickDisplayManager, clickDetector.ClickDisplayManager.ClickDisplayInfo clickDisplayInfo)
      The symbol chooser for the BT display
    • ClickBTDisplay Link icon

      public ClickBTDisplay(STClickControl clickControl, ClickDisplayManager clickDisplayManager, clickDetector.ClickDisplayManager.ClickDisplayInfo clickDisplayInfo)
      Constructor needed when creating the SoundTrap Click Detector - need to explicitly cast from STClickControl to ClickControl, or else constructor fails
      Parameters:
      clickControl -
      clickDisplayManager -
      clickDisplayInfo -
  • Method Details Link icon

    • getObserverObject Link icon

      public PamObserver getObserverObject()
      Specified by:
      getObserverObject in interface PamObserver
      Returns:
      the actual observer. In most cases concrete classes will just return 'this' in response. The exception is the Threaded observer, which will return the single thread observer.
    • created Link icon

      public void created()
      Overrides:
      created in class ClickDisplay
    • getRequiredDataHistory Link icon

      public long getRequiredDataHistory(PamObservable o, Object arg)
      Specified by:
      getRequiredDataHistory in interface PamObserver
      Parameters:
      arg - optional argument from PamObservable
      Returns:
      time in milliseconds required by data held in PamObservable
    • addData Link icon

      public void addData(PamObservable obs, PamDataUnit newData)
      Description copied from interface: PamObserver
      Informs the PamObserver that new data have been added to the Observable class
      Specified by:
      addData in interface PamObserver
    • updateData Link icon

      public void updateData(PamObservable observable, PamDataUnit pamDataUnit)
      Description copied from interface: PamObserver
      Informs the PamObserver that existing data have been updated
      Specified by:
      updateData in interface PamObserver
    • newClick Link icon

      public void newClick(ClickDetection clickDataUnit)
    • newRawData Link icon

      public void newRawData(PamDataBlock rawDataBlock, RawDataUnit newRawData)
      during real time operation the scrolling is all controlled by the arrival of new raw data unis observed by the BT display. This is now delegated to newScrollTimingData so that it cab be called for clicks arriving from the network receiver.
      Parameters:
      rawDataBlock -
      newRawData -
    • newScrollTimingData Link icon

      public void newScrollTimingData(long millis)
    • getObserverName Link icon

      public String getObserverName()
      Specified by:
      getObserverName in interface PamObserver
    • setSampleRate Link icon

      public void setSampleRate(float sampleRate, boolean notify)
      Description copied from interface: PamObserver
      New sample rate
      Specified by:
      setSampleRate in interface PamObserver
      Parameters:
      sampleRate -
      notify - Notify other PamObservers and PamObservables in the chain.
    • masterClockUpdate Link icon

      public void masterClockUpdate(long milliSeconds, long sampleNumber)
      Specified by:
      masterClockUpdate in interface PamObserver
    • getVScaleManager Link icon

      public clickDetector.ClickBTDisplay.VScaleManager getVScaleManager()
      Returns:
      the appropriate manager for the vertical scale.
    • offlineDataChanged Link icon

      public void offlineDataChanged()
      Description copied from class: ClickDisplay
      Called from clicksOffline when data have changed (eg from re doing click id). Needs to notify the display and maybe some other classes.
      Overrides:
      offlineDataChanged in class ClickDisplay
    • repaintBoth Link icon

      public void repaintBoth()
      Repaints both the plot and the axis panel
    • repaintTotal Link icon

      public void repaintTotal()
      Repaints forcing a redrawing of all click. Use this to redraw plot from other packages.
    • getDataSelector Link icon

      public DataSelector getDataSelector()
      Get a data selector specific to this display.
      Returns:
      click data selector specific to this display.
    • getClickDataSelector Link icon

      public ClickDataSelector getClickDataSelector()
      get the click specific data selector which may now be burried in a CompoundDataSelector if annotations have been used.
      Returns:
      ClickDataSelector.
    • showDataSelector Link icon

      public void showDataSelector()
    • finalize Link icon

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Object
      Throws:
      Throwable
    • getName Link icon

      public String getName()
      Description copied from class: PamFramePlots
      Get a unique name for the display
      Specified by:
      getName in class PamFramePlots
      Returns:
      a unique name for the display.
    • noteNewSettings Link icon

      public void noteNewSettings()
      Specified by:
      noteNewSettings in interface PamObserver
      Specified by:
      noteNewSettings in class ClickDisplay
    • notifyNewStorage Link icon

      public void notifyNewStorage(String storageName)
    • removeObservable Link icon

      public void removeObservable(PamObservable o)
      Description copied from interface: PamObserver
      called when an Observable (PamDataBlock) is removed from the system
      Specified by:
      removeObservable in interface PamObserver
    • pamStart Link icon

      public void pamStart()
      Overrides:
      pamStart in class ClickDisplay
    • getDisplayChannels Link icon

      public int getDisplayChannels()
    • setDisplayChannels Link icon

      public void setDisplayChannels(int displayChannels)
    • getSettingsReference Link icon

      public Serializable getSettingsReference()
      Specified by:
      getSettingsReference in interface PamSettings
      Returns:
      The serialisable object that will be stored
    • getSettingsVersion Link icon

      public long getSettingsVersion()
      Specified by:
      getSettingsVersion in interface PamSettings
      Returns:
      An integer version number for the settings
    • getUnitName Link icon

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType Link icon

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • restoreSettings Link icon

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      Parameters:
      pamControlledUnitSettings -
      Returns:
      true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
    • getSelectedClick Link icon

      public ClickDetection getSelectedClick()
    • setSelectedClick Link icon

      public void setSelectedClick(ClickDetection selectedClick)
      Set the currently selected click
      Parameters:
      selectedClick - - the click to set.
    • clickedOnClick Link icon

      public void clickedOnClick(ClickDetection click)
      Overrides:
      clickedOnClick in class ClickDisplay
    • makeMarkedClickList Link icon

      public void makeMarkedClickList()
      Called when a zoom polygon has been completed and immediately makes a list of all marked clicks.
      Parameters:
      zoomShape -
    • getMarkedClicks Link icon

      public ArrayList<PamDataUnit> getMarkedClicks()
      Returns:
      a list of clicks which are within a marked area.
    • gotoEvent Link icon

      public void gotoEvent(OfflineEventDataUnit event, int beforeTime)
      Scroll the display to a specific event.
      Parameters:
      event - event to scroll to
      beforeTime - seconds before the event to scroll to.
    • playViewerData Link icon

      public void playViewerData()
      Play the first two channels in the channel list for this display.
    • playClicks Link icon

      public void playClicks()
    • getBtDisplayParameters Link icon

      public BTDisplayParameters getBtDisplayParameters()
      Returns:
      the btDisplayParameters
    • getCtrlKeyManager Link icon

      public CtrlKeyManager getCtrlKeyManager()
      Returns:
      the ctrlKeyManager
    • amplitudeSelectChanged Link icon

      public void amplitudeSelectChanged()
    • getBTProjector Link icon

      public GeneralProjector getBTProjector()
    • getyAxis Link icon

      public PamAxis getyAxis()
      Returns:
      the yAxis
    • getxAxis Link icon

      public PamAxis getxAxis()
      Returns:
      the xAxis
    • gethScrollManager Link icon

      public clickDetector.ClickBTDisplay.HScrollManager gethScrollManager()
      Returns:
      the hScrollManager
    • getBtAxis Link icon

      public clickDetector.ClickBTDisplay.BTAxis getBtAxis()
      Get the y axis for the bearing time display.
      Returns:
      the y axis.
    • symbolUpdate Link icon

      public void symbolUpdate()
      Specified by:
      symbolUpdate in interface SymbolUpdateMonitor
    • receiveSourceNotification Link icon

      public void receiveSourceNotification(int type, Object object)
      Description copied from interface: PamObserver
      Receive a notification from the data source - typically a change in DAQ status. See the constants listed in AcquisitionProcess for potential change types.
      Specified by:
      receiveSourceNotification in interface PamObserver
      Parameters:
      type - the type of change
      object - generic object added here so that we can include anything in the future