clickDetector
Class ClickSpectrum
java.lang.Object
Layout.PamFramePlots
clickDetector.ClickDisplay
clickDetector.ClickSpectrum
- All Implemented Interfaces:
- PamSettings, PamObserver
public class ClickSpectrum
- extends ClickDisplay
- implements PamObserver, PamSettings
| Methods inherited from class Layout.PamFramePlots |
getAxisPanel, getCopyMenuItem, getEastPanel, getFrame, getNorthPanel, getPlotPanel, getSouthPanel, getWestPanel, repaint, setAxisPanel, setEastPanel, setFrame, setNorthPanel, setPlotPanel, setSouthPanel, setWestPanel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
clickControl
private ClickControl clickControl
spectrumAxisPanel
private ClickSpectrum.SpectrumAxis spectrumAxisPanel
spectrumPlotPanl
private ClickSpectrum.SpectrumPlot spectrumPlotPanl
spectrumInfo
private ClickSpectrum.SpectrumInfo spectrumInfo
cursorPos
private PamLabel cursorPos
frequencyAxis
private PamAxis frequencyAxis
amplitudeAxis
private PamAxis amplitudeAxis
storedClick
private ClickDetection storedClick
storedSpectrum
private double[][] storedSpectrum
logSpectrum
private double[][] logSpectrum
clickSpectrumParams
private ClickSpectrumParams clickSpectrumParams
storedSpectrumLock
private java.lang.Object storedSpectrumLock
ClickSpectrum
public ClickSpectrum(ClickControl clickControl,
ClickDisplayManager clickDisplayManager,
ClickDisplayManager.ClickDisplayInfo clickDisplayInfo)
getObserverObject
public PamObserver getObserverObject()
- Specified by:
getObserverObject in interface PamObserver
- 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.
sortWestAxis
private void sortWestAxis()
plotOptions
private void plotOptions()
getName
public java.lang.String getName()
- Specified by:
getName in class PamFramePlots
newClick
public void newClick(ClickDetection newClick)
showClick
private void showClick(ClickDetection newClick)
getObserverName
public java.lang.String getObserverName()
- Specified by:
getObserverName in interface PamObserver
getRequiredDataHistory
public long getRequiredDataHistory(PamObservable o,
java.lang.Object arg)
- Specified by:
getRequiredDataHistory in interface PamObserver
- Parameters:
o - PamObservable class requiring the dataarg - optional argument from PamObservable
- Returns:
- time in milliseconds requried by data held in PamObservable
noteNewSettings
public void noteNewSettings()
- Specified by:
noteNewSettings in interface PamObserver- Specified by:
noteNewSettings in class ClickDisplay
removeObservable
public void removeObservable(PamObservable o)
- Description copied from interface:
PamObserver
- called when an Observable (PamDataBlock) is removed from the system
- Specified by:
removeObservable in interface PamObserver
setSampleRate
public void setSampleRate(float sampleRate,
boolean notify)
- Description copied from interface:
PamObserver
- New sample rate
- Specified by:
setSampleRate in interface PamObserver
notify - Notify other PamObservers and PamObservables in the chain.
masterClockUpdate
public void masterClockUpdate(long milliSeconds,
long sampleNumber)
- Specified by:
masterClockUpdate in interface PamObserver
update
public void update(PamObservable o,
PamDataUnit arg)
- Description copied from interface:
PamObserver
- Informs the PamObserver that new data have been added to the Observable
class
- Specified by:
update in interface PamObserver
- Parameters:
o - Reference to the Observable (a PamDataBlock)arg - Reference to the new PamDataUnit
clickedOnClick
public void clickedOnClick(ClickDetection click)
- Overrides:
clickedOnClick in class ClickDisplay
getSettingsReference
public java.io.Serializable getSettingsReference()
- Specified by:
getSettingsReference in interface PamSettings
- Returns:
- The serialisable object that will be stored
getSettingsVersion
public long getSettingsVersion()
- Specified by:
getSettingsVersion in interface PamSettings
- Returns:
- An integer version number for the settings
getUnitName
public java.lang.String getUnitName()
- Specified by:
getUnitName in interface PamSettings
- Returns:
- A Name specific to this instance of the particular class, e.g.
Sperm whale detector, Beaked whale detector, etc.
getUnitType
public java.lang.String getUnitType()
- Specified by:
getUnitType in interface PamSettings
- Returns:
- A Name specific to the type, e.g. Glick detector
restoreSettings
public boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
- Specified by:
restoreSettings in interface PamSettings
- 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