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

  • Constructor Details

    • ClickBTDisplay

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

      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

    • getObserverObject

      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

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

      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

      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

      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

      public void newClick(ClickDetection clickDataUnit)
    • newRawData

      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

      public void newScrollTimingData(long millis)
    • getObserverName

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

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

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

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

      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

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

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

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

      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

      public void showDataSelector()
    • getName

      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

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

      public void notifyNewStorage(String storageName)
    • removeObservable

      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

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

      public int getDisplayChannels()
    • setDisplayChannels

      public void setDisplayChannels(int displayChannels)
    • getSettingsReference

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

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

      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

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

      public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
      Specified by:
      restoreSettings in interface PamSettings
      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

      public ClickDetection getSelectedClick()
    • setSelectedClick

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

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

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

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

      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

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

      public void playClicks()
    • getBtDisplayParameters

      public BTDisplayParameters getBtDisplayParameters()
      Returns:
      the btDisplayParameters
    • getCtrlKeyManager

      public CtrlKeyManager getCtrlKeyManager()
      Returns:
      the ctrlKeyManager
    • amplitudeSelectChanged

      public void amplitudeSelectChanged()
    • getBTProjector

      public GeneralProjector getBTProjector()
    • getyAxis

      public PamAxis getyAxis()
      Returns:
      the yAxis
    • getxAxis

      public PamAxis getxAxis()
      Returns:
      the xAxis
    • gethScrollManager

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

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

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

      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