Class ClicksOffline

java.lang.Object
clickDetector.offlineFuncs.ClicksOffline

public class ClicksOffline extends Object
Functions for handling offline data display and processing.

Basically, this is an add on the ClickController, but split off into a separate class since the main ClickController has got a bit over cumbersome.

Author:
Doug Gillespie
  • Field Details

  • Constructor Details

    • ClicksOffline

      public ClicksOffline(ClickControl clickControl)
      Constructor, called from ClickControl.
      Parameters:
      clickControl -
  • Method Details

    • addDetectorMenuItems

      public int addDetectorMenuItems(Frame owner, Container menu)
      Add offline functions to the top of the main Detector menu when operating in viewer mode.
      Parameters:
      menu - menu to add items to
      Returns:
      number of items added.
    • addBTMenuItems

      public int addBTMenuItems(Container menu, OverlayMark overlayMark, ClickBTDisplay btDisplay, boolean hasZoom, ClickDetection clickedClick)
      Add menu items associated with right mouse actions on bearing time display
      Parameters:
      menu - menu to add items to
      hasZoom - whether or not the display has a zoomed area.
      isOnClick - whether or not the mouse is on a click.
      Returns:
      number of items added to the menu
    • addBTMenuItems

      public int addBTMenuItems(Container menu, OverlayMark overlayMark, List<PamDataUnit> markedClicks, boolean hasZoom, PamDataUnit singleDataUnit)
    • getExportMenuItem

      public JMenuItem getExportMenuItem(Frame parentFrame)
      Create a menu item for exporting click event data.
      Parameters:
      parentFrame - parent frame (for any created dialog)
      Returns:
      menu item.
    • checkEventDatabase

      public void checkEventDatabase(Frame frame)
    • getDatabaseCheckItem

      public JMenuItem getDatabaseCheckItem(Frame parentFrame)
    • reAnalyseClicks

      public void reAnalyseClicks()
      Go through clicks and do things like re classify to species, look for trains, etc. This may eventually need to be done within each offlineStore if it's not possible to find a common way of scrolling through all clicks.
    • exportEventData

      public void exportEventData(Frame frame)
    • getOfflineTaskGroup

      public static OfflineTaskGroup getOfflineTaskGroup(ClickControl clickControl)
      Get / Create an offline task group for click re-processing.
      Returns:
      offline task group. Create if necessary
    • labelClicks

      public void labelClicks(OverlayMark overlayMark, List<PamDataUnit> dataList)
    • newEvent

      public void newEvent(OverlayMark overlayMark, List<PamDataUnit> markedClicks)
    • getNextEventColourIndex

      public int getNextEventColourIndex()
      Get the most likely next colour index.
      Returns:
      next colour index.
    • unLabelClicks

      public void unLabelClicks(OverlayMark overlayMark, List<PamDataUnit> markedClicks, int eventNumber)
      Remove event labels from data units.
      Parameters:
      markedClicks -
      eventNumber -
      btDisplay -
    • labelClick

      public void labelClick(OverlayMark overlayMark, PamDataUnit singleClick)
    • unLabelClicks

      public void unLabelClicks(OverlayMark overlayMark, List<PamDataUnit> unitsList)
    • unLabelClick

      public void unLabelClick(OverlayMark overlayMark, PamDataUnit dataUnit)
    • getClickControl

      public ClickControl getClickControl()
    • setOfflineParameters

      public void setOfflineParameters(OfflineParameters offlineParameters)
      Parameters:
      offlineParameters - the offlineParameters to set
    • getOfflineParameters

      public OfflineParameters getOfflineParameters()
      Returns:
      the offlineParameters
    • findBinaryDataSource

      public ClickBinaryDataSource findBinaryDataSource()
    • findOfflineDataMap

      public BinaryOfflineDataMap findOfflineDataMap()
    • saveClicks

      public boolean saveClicks()
    • newMarkedClick

      public void newMarkedClick(OverlayMark overlayMark, PamDataUnit singleUnit, ClickBTDisplay btDisplay)
      Called whenever a single click is selected with no overlay mark to add key shortcuts.
      Parameters:
      overlayMark - - the overlay mark (should be null if single keys are going to be added)
      singleUnit - - the single data unit
      btDisplay - - the bearing time display.
    • newMarkedClickList

      public void newMarkedClickList(OverlayMark overlayMark, List<PamDataUnit> markedClicks, ClickBTDisplay btDisplay)
      Called whenever a new marked list to add shortcut keys
      Parameters:
      overlayMark - - overlay mark
      markedClicks - - marked click list.
      btDisplay - - the bearing time display.