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
Modifier and TypeClassDescriptionclass
class
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
ConstructorDescriptionClickBTDisplay
(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 TypeMethodDescriptionvoid
addData
(PamObservable obs, PamDataUnit newData) Informs the PamObserver that new data have been added to the Observable classvoid
void
clickedOnClick
(ClickDetection click) void
created()
clickDetector.ClickBTDisplay.BTAxis
Get 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.int
clickDetector.ClickBTDisplay.HScrollManager
getName()
Get a unique name for the displaylong
long
clickDetector.ClickBTDisplay.VScaleManager
getxAxis()
getyAxis()
void
gotoEvent
(OfflineEventDataUnit event, int beforeTime) Scroll the display to a specific event.void
Called when a zoom polygon has been completed and immediately makes a list of all marked clicks.void
masterClockUpdate
(long milliSeconds, long sampleNumber) void
newClick
(ClickDetection clickDataUnit) 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.void
newScrollTimingData
(long millis) void
void
notifyNewStorage
(String storageName) void
Called from clicksOffline when data have changed (eg from re doing click id).void
pamStart()
void
void
Play the first two channels in the channel list for this display.void
receiveSourceNotification
(int type, Object object) Receive a notification from the data source - typically a change in DAQ status.void
called when an Observable (PamDataBlock) is removed from the systemvoid
Repaints both the plot and the axis panelvoid
Repaints forcing a redrawing of all click.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setDisplayChannels
(int displayChannels) void
setSampleRate
(float sampleRate, boolean notify) New sample ratevoid
setSelectedClick
(ClickDetection selectedClick) Set the currently selected clickvoid
void
void
updateData
(PamObservable observable, PamDataUnit pamDataUnit) Informs the PamObserver that existing data have been updatedMethods inherited from class clickDetector.ClickDisplay
getClickDisplayInfo, pamStop
Methods 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
-
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:
getObserverObject
in 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:
created
in classClickDisplay
-
getRequiredDataHistory
- Specified by:
getRequiredDataHistory
in interfacePamObserver
- Parameters:
arg
- optional argument from PamObservable- Returns:
- time in milliseconds required by data held in PamObservable
-
addData
Description copied from interface:PamObserver
Informs the PamObserver that new data have been added to the Observable class- Specified by:
addData
in interfacePamObserver
-
updateData
Description copied from interface:PamObserver
Informs the PamObserver that existing data have been updated- Specified by:
updateData
in 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:
getObserverName
in interfacePamObserver
-
setSampleRate
public void setSampleRate(float sampleRate, boolean notify) Description copied from interface:PamObserver
New sample rate- Specified by:
setSampleRate
in interfacePamObserver
- Parameters:
notify
- Notify other PamObservers and PamObservables in the chain.
-
masterClockUpdate
public void masterClockUpdate(long milliSeconds, long sampleNumber) - Specified by:
masterClockUpdate
in interfacePamObserver
-
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 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() -
getName
Description copied from class:PamFramePlots
Get a unique name for the display- Specified by:
getName
in classPamFramePlots
- Returns:
- a unique name for the display.
-
noteNewSettings
public void noteNewSettings()- Specified by:
noteNewSettings
in interfacePamObserver
- Specified by:
noteNewSettings
in classClickDisplay
-
notifyNewStorage
-
removeObservable
Description copied from interface:PamObserver
called when an Observable (PamDataBlock) is removed from the system- Specified by:
removeObservable
in interfacePamObserver
-
pamStart
public void pamStart()- Overrides:
pamStart
in classClickDisplay
-
getDisplayChannels
public int getDisplayChannels() -
setDisplayChannels
public void setDisplayChannels(int displayChannels) -
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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:
clickedOnClick
in 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:
symbolUpdate
in interfaceSymbolUpdateMonitor
-
receiveSourceNotification
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 interfacePamObserver
- Parameters:
type
- the type of changeobject
- generic object added here so that we can include anything in the future
-