Package clickDetector
Class IDI_Display
java.lang.Object
Layout.PamFramePlots
clickDetector.ClickDisplay
clickDetector.IDI_Display
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider,PamObserver
Creates a click ICI histogram display add-in
- Author:
 - Michael Oswald
 
- 
Constructor Summary
ConstructorsConstructorDescriptionIDI_Display(ClickControl clickControl, ClickDisplayManager clickDisplayManager, clickDetector.ClickDisplayManager.ClickDisplayInfo clickDisplayInfo) Main constructorIDI_Display(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 o, PamDataUnit arg) On new data, add ICI variable to current histogramCreates a string of counts from the high-res and low-res histogram bins (high-res histogram first, then low).Creates a header string for the output file, based on the current high- and low-res bin values (high-res histogram first, then low).getName()Get a unique name for the displaylonglongvoidmasterClockUpdate(long milliSeconds, long sampleNumber) voidClass containing the axis, histogram and color barvoidpamStart()On audio start, start the timer and create a new histogram object in the array.voidpamStop()called when user stops the audio capturevoidreceiveSourceNotification(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 systembooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) voidSets the axes parameters, based on the current IDI_DisplayParams object.voidsetSampleRate(float sampleRate, boolean notify) New sample ratevoidsetTimer()Creates a new timer and sets the schedule.voidupdateData(PamObservable observable, PamDataUnit pamDataUnit) Informs the PamObserver that existing data have been updatedMethods inherited from class clickDetector.ClickDisplay
clickedOnClick, created, getClickDisplayInfo, offlineDataChangedMethods 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 
- 
Constructor Details
- 
IDI_Display
public IDI_Display(ClickControl clickControl, ClickDisplayManager clickDisplayManager, clickDetector.ClickDisplayManager.ClickDisplayInfo clickDisplayInfo) Main constructor- Parameters:
 clickControl-clickDisplayManager-clickDisplayInfo-
 - 
IDI_Display
public IDI_Display(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
- 
setParameters
public void setParameters()Sets the axes parameters, based on the current IDI_DisplayParams object. This method is called from PamStart, and also when the Parameters Dialog is closed. - 
setTimer
public void setTimer()Creates a new timer and sets the schedule. If a timer already exists when this method is called, it is canceled first - 
pamStart
public void pamStart()On audio start, start the timer and create a new histogram object in the array. Use the highest bin in the low-resolution display to set the size of the histogram.- Overrides:
 pamStartin classClickDisplay
 - 
pamStop
public void pamStop()called when user stops the audio capture- Overrides:
 pamStopin classClickDisplay
 - 
addData
On new data, add ICI variable to current histogram- Specified by:
 addDatain interfacePamObserver
 - 
updateData
Description copied from interface:PamObserverInforms the PamObserver that existing data have been updated- Specified by:
 updateDatain interfacePamObserver
 - 
getHeaderString
Creates a header string for the output file, based on the current high- and low-res bin values (high-res histogram first, then low).- Returns:
 - the header string
 
 - 
getDataString
Creates a string of counts from the high-res and low-res histogram bins (high-res histogram first, then low).- Returns:
 - the data string
 
 - 
noteNewSettings
public void noteNewSettings()Class containing the axis, histogram and color bar- Specified by:
 noteNewSettingsin interfacePamObserver- Specified by:
 noteNewSettingsin classClickDisplay
 - 
getObserverName
- Specified by:
 getObserverNamein interfacePamObserver
 - 
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.
 
 - 
getRequiredDataHistory
- Specified by:
 getRequiredDataHistoryin interfacePamObserver- Parameters:
 arg- optional argument from PamObservable- Returns:
 - time in milliseconds required by data held in PamObservable
 
 - 
masterClockUpdate
public void masterClockUpdate(long milliSeconds, long sampleNumber) - Specified by:
 masterClockUpdatein interfacePamObserver
 - 
removeObservable
Description copied from interface:PamObservercalled when an Observable (PamDataBlock) is removed from the system- Specified by:
 removeObservablein 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.
 - 
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
 - 
getName
Description copied from class:PamFramePlotsGet a unique name for the display- Specified by:
 getNamein classPamFramePlots- Returns:
 - a unique name for the display.
 
 - 
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
 
 
 -