clickDetector.offlineFuncs
Class ClicksOffline

java.lang.Object
  extended by clickDetector.offlineFuncs.ClicksOffline

public class ClicksOffline
extends java.lang.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

Nested Class Summary
private  class ClicksOffline.LabelClick
           
private  class ClicksOffline.LabelClicks
           
private  class ClicksOffline.QuickAddClicks
           
(package private)  class ClicksOffline.ReanalProgress
           
(package private)  class ClicksOffline.ReanalWorker
          Class that can execute jobs on files, or multiple files during offline reanalysis of data.
private  class ClicksOffline.ReanalyseClicks
           
private  class ClicksOffline.ShowEvents
           
 
Field Summary
private  ClickControl clickControl
           
private  OfflineParameters offlineParameters
           
 
Constructor Summary
ClicksOffline(ClickControl clickControl)
          Constructor, called from ClickControl.
 
Method Summary
 int addBTMenuItems(java.awt.Container menu, ClickBTDisplay btDisplay, boolean hasZoom, ClickDetection clickedClick)
          Add menu items associated with right mouse actions on bearing time display
 int addDetectorMenuItems(java.awt.Frame owner, java.awt.Container menu)
          Add offline functions to the top of the main Detector menu when operating in viewer mode.
 ClicksOffline.ReanalWorker createReanalWorker(ReanalMonitor reanalMonitor)
           
private  OfflineEventDataUnit findAutoEvent(ClickBTDisplay btDisplay)
          Automatically work out if there is an obvious event to add clicks to.
 ClickBinaryDataSource findBinaryDataSource()
           
private  BinaryStore findBinaryStore()
           
 BinaryOfflineDataMap findOfflineDataMap()
           
 ClickControl getClickControl()
           
 OfflineParameters getOfflineParameters()
           
 void labelClick(ClickBTDisplay btDisplay)
           
 void labelClicks(ClickBTDisplay btDisplay)
           
protected  void offlineDataChanged()
          Called from when data have changed (eg from re doing click id).
private  void processClick(ClickDetection click)
           
 void reAnalyseClicks()
          Go through clicks and do things like re classify to species, look for trains, etc.
protected  void runClickClassification()
           
 void setOfflineParameters(OfflineParameters offlineParameters)
           
protected  void storageClosed()
          Called when the click store has closed Will need to delete all data from the module.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clickControl

private ClickControl clickControl

offlineParameters

private OfflineParameters offlineParameters
Constructor Detail

ClicksOffline

public ClicksOffline(ClickControl clickControl)
Constructor, called from ClickControl.

Parameters:
clickControl -
Method Detail

runClickClassification

protected void runClickClassification()

storageClosed

protected void storageClosed()
Called when the click store has closed Will need to delete all data from the module. will be called from the offlineStore


offlineDataChanged

protected void offlineDataChanged()
Called from when data have changed (eg from re doing click id). Needs to notify the display and maybe some other classes.


addDetectorMenuItems

public int addDetectorMenuItems(java.awt.Frame owner,
                                java.awt.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(java.awt.Container menu,
                          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

findAutoEvent

private OfflineEventDataUnit findAutoEvent(ClickBTDisplay btDisplay)
Automatically work out if there is an obvious event to add clicks to.

this will either be the last event anything was added to, or a unique event already used with the clicks in the marked list.

Parameters:
btDisplay - Bearing time display
Returns:
existing event, or null.

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.


labelClicks

public void labelClicks(ClickBTDisplay btDisplay)

labelClick

public void labelClick(ClickBTDisplay btDisplay)

processClick

private void processClick(ClickDetection click)

getClickControl

public ClickControl getClickControl()

setOfflineParameters

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

getOfflineParameters

public OfflineParameters getOfflineParameters()
Returns:
the offlineParameters

createReanalWorker

public ClicksOffline.ReanalWorker createReanalWorker(ReanalMonitor reanalMonitor)

findBinaryDataSource

public ClickBinaryDataSource findBinaryDataSource()

findBinaryStore

private BinaryStore findBinaryStore()

findOfflineDataMap

public BinaryOfflineDataMap findOfflineDataMap()