Package clickDetector
Class ClickBTDisplay
java.lang.Object
Layout.PamFramePlots
clickDetector.ClickDisplay
clickDetector.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
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclass - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected clickDetector.ClickBTDisplay.BTPlot - 
Constructor Summary
ConstructorsConstructorDescriptionClickBTDisplay(ClickControl clickControl, ClickDisplayManager clickDisplayManager, clickDetector.ClickDisplayManager.ClickDisplayInfo clickDisplayInfo) The symbol chooser for the BT displayClickBTDisplay(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 - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddData(PamObservable obs, PamDataUnit newData) Informs the PamObserver that new data have been added to the Observable classvoidvoidclickedOnClick(ClickDetection click) voidcreated()protected voidfinalize()clickDetector.ClickBTDisplay.BTAxisGet the y axis for the bearing time display.get the click specific data selector which may now be burried in a CompoundDataSelector if annotations have been used.Get a data selector specific to this display.intclickDetector.ClickBTDisplay.HScrollManagergetName()Get a unique name for the displaylonglongclickDetector.ClickBTDisplay.VScaleManagergetxAxis()getyAxis()voidgotoEvent(OfflineEventDataUnit event, int beforeTime) Scroll the display to a specific event.voidCalled when a zoom polygon has been completed and immediately makes a list of all marked clicks.voidmasterClockUpdate(long milliSeconds, long sampleNumber) voidnewClick(ClickDetection clickDataUnit) voidnewRawData(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.voidnewScrollTimingData(long millis) voidvoidnotifyNewStorage(String storageName) voidCalled from clicksOffline when data have changed (eg from re doing click id).voidpamStart()voidvoidPlay the first two channels in the channel list for this display.voidreceiveSourceNotification(int type, Object object) Receive a notification from the data source - typically a change in DAQ status.voidcalled when an Observable (PamDataBlock) is removed from the systemvoidRepaints both the plot and the axis panelvoidRepaints forcing a redrawing of all click.booleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidsetDisplayChannels(int displayChannels) voidsetSampleRate(float sampleRate, boolean notify) New sample ratevoidsetSelectedClick(ClickDetection selectedClick) Set the currently selected clickvoidvoidvoidupdateData(PamObservable observable, PamDataUnit pamDataUnit) Informs the PamObserver that existing data have been updatedMethods inherited from class clickDetector.ClickDisplay
getClickDisplayInfo, pamStopMethods inherited from class Layout.PamFramePlots
checkDualDisplay, getAxisPanel, getCopyMenuItem, getEastPanel, getFrame, getLeftPlotPanel, getNorthPanel, getPlotPanel, getRightPlotPanel, getSouthPanel, getWestPanel, repaint, setAxisPanel, setEastPanel, setFrame, setLeftPlotPanel, setNorthPanel, setPlotPanel, setRightPlotPanel, setSouthPanel, setWestPanel 
- 
Field Details
- 
btPlot
protected clickDetector.ClickBTDisplay.BTPlot btPlot - 
cursorLabel
 - 
rangeSpinner
 - 
symbolChooser
 
 - 
 - 
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
- Specified by:
 getObserverObjectin interfacePamObserver- 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:
 createdin classClickDisplay
 - 
getRequiredDataHistory
- Specified by:
 getRequiredDataHistoryin interfacePamObserver- Parameters:
 arg- optional argument from PamObservable- Returns:
 - time in milliseconds required by data held in PamObservable
 
 - 
addData
Description copied from interface:PamObserverInforms the PamObserver that new data have been added to the Observable class- Specified by:
 addDatain interfacePamObserver
 - 
updateData
Description copied from interface:PamObserverInforms the PamObserver that existing data have been updated- Specified by:
 updateDatain interfacePamObserver
 - 
newClick
 - 
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
- Specified by:
 getObserverNamein interfacePamObserver
 - 
setSampleRate
public void setSampleRate(float sampleRate, boolean notify) Description copied from interface:PamObserverNew sample rate- Specified by:
 setSampleRatein interfacePamObserver- Parameters:
 sampleRate-notify- Notify other PamObservers and PamObservables in the chain.
 - 
masterClockUpdate
public void masterClockUpdate(long milliSeconds, long sampleNumber) - Specified by:
 masterClockUpdatein interfacePamObserver
 - 
getVScaleManager
public clickDetector.ClickBTDisplay.VScaleManager getVScaleManager()- Returns:
 - the appropriate manager for the vertical scale.
 
 - 
offlineDataChanged
public void offlineDataChanged()Description copied from class:ClickDisplayCalled from clicksOffline when data have changed (eg from re doing click id). Needs to notify the display and maybe some other classes.- Overrides:
 offlineDataChangedin classClickDisplay
 - 
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
Get a data selector specific to this display.- Returns:
 - click data selector specific to this display.
 
 - 
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() - 
finalize
 - 
getName
Description copied from class:PamFramePlotsGet a unique name for the display- Specified by:
 getNamein classPamFramePlots- Returns:
 - a unique name for the display.
 
 - 
noteNewSettings
public void noteNewSettings()- Specified by:
 noteNewSettingsin interfacePamObserver- Specified by:
 noteNewSettingsin classClickDisplay
 - 
notifyNewStorage
 - 
removeObservable
Description copied from interface:PamObservercalled when an Observable (PamDataBlock) is removed from the system- Specified by:
 removeObservablein interfacePamObserver
 - 
pamStart
public void pamStart()- Overrides:
 pamStartin classClickDisplay
 - 
getDisplayChannels
public int getDisplayChannels() - 
setDisplayChannels
public void setDisplayChannels(int displayChannels)  - 
getSettingsReference
- Specified by:
 getSettingsReferencein interfacePamSettings- Returns:
 - The serialisable object that will be stored
 
 - 
getSettingsVersion
public long getSettingsVersion()- Specified by:
 getSettingsVersionin interfacePamSettings- Returns:
 - An integer version number for the settings
 
 - 
getUnitName
- Specified by:
 getUnitNamein interfaceSettingsNameProvider- Returns:
 - A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
 
 - 
getUnitType
- Specified by:
 getUnitTypein interfacePamSettings- Returns:
 - A Name specific to the type, e.g. Click detector
 
 - 
restoreSettings
- Specified by:
 restoreSettingsin interfacePamSettings- 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
 - 
setSelectedClick
Set the currently selected click- Parameters:
 selectedClick- - the click to set.
 - 
clickedOnClick
- Overrides:
 clickedOnClickin classClickDisplay
 - 
makeMarkedClickList
public void makeMarkedClickList()Called when a zoom polygon has been completed and immediately makes a list of all marked clicks.- Parameters:
 zoomShape-
 - 
getMarkedClicks
- Returns:
 - a list of clicks which are within a marked area.
 
 - 
gotoEvent
Scroll the display to a specific event.- Parameters:
 event- event to scroll tobeforeTime- 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
- Returns:
 - the btDisplayParameters
 
 - 
getCtrlKeyManager
- Returns:
 - the ctrlKeyManager
 
 - 
amplitudeSelectChanged
public void amplitudeSelectChanged() - 
getBTProjector
 - 
getyAxis
- Returns:
 - the yAxis
 
 - 
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:
 symbolUpdatein interfaceSymbolUpdateMonitor
 - 
receiveSourceNotification
Description copied from interface:PamObserverReceive a notification from the data source - typically a change in DAQ status. See the constants listed in AcquisitionProcess for potential change types.- Specified by:
 receiveSourceNotificationin interfacePamObserver- Parameters:
 type- the type of changeobject- generic object added here so that we can include anything in the future
 
 -