Package rocca
Class RoccaWhistleSelect
java.lang.Object
PamguardMVC.PamProcess
rocca.RoccaWhistleSelect
- All Implemented Interfaces:
PamObserver
,ProcessAnnotator
,SpectrogramMarkObserver
-
Field Summary
Fields inherited from interface Spectrogram.SpectrogramMarkObserver
MOUSE_DOWN, MOUSE_DRAG, MOUSE_UP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canMark()
void
Called from the PamControlled unit when a PamControlled unit is removed from the model.getDataBlockSubset
(FFTDataBlock fullFFTDataBlock, int channel) Create a subset of the FFTDataBlock being displayed, based on the starting and ending times selected by the userName of the mark.getRawData
(FFTDataBlock fftDataBlock) void
pamStart()
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).void
pamStop()
Stops the process.void
spectrogramNotification
(SpectrogramDisplay display, int downUp, int channel, long startMilliseconds, long duration, double f1, double f2, TDGraphFX tdDisplay) Original spectrogramNotification method.boolean
spectrogramNotification
(SpectrogramDisplay display, MouseEvent mouseEvent, int downUp, int channel, long startMilliseconds, long duration, double f1, double f2, TDGraphFX tdDisplay) Updated spectrogramNotification method.Methods inherited from class PamguardMVC.PamProcess
absMillisecondsToSamples, absSamplesToMilliseconds, addData, addMultiPlexDataBlock, addOutputDataBlock, changedThreading, clearOldData, createAnnotations, dumpBufferStatus, flushDataBlockBuffers, getAncestorDataBlock, getAnnotation, getChainPosition, getCompatibleDataUnits, getCpuPercent, getFrequencyRange, getLastSourceNotificationObject, getLastSourceNotificationType, getMuiltiplexDataBlock, getNumAnnotations, getNumMuiltiplexDataBlocks, getNumOutputDataBlocks, getObserverName, getObserverObject, getOfflineData, getOfflineData, getOutputDataBlock, getOutputDataBlocks, getPamControlledUnit, getParentDataBlock, getParentDataBlocks, getParentProcess, getProcessCheck, getProcessName, getRawSourceDataBlock, getRawSourceDataBlock, getRequiredDataHistory, getSampleRate, getSourceDataBlock, getSourceProcess, hasOutputDatablock, isCanMultiThread, isExternalProcess, isMultiplex, makePamProcess, masterClockUpdate, newData, noteNewSettings, notifyModelChanged, prepareProcess, prepareProcessOK, processNewBuoyData, receiveSourceNotification, relMillisecondsToSamples, relSamplesToMilliseconds, removeAllDataBlocks, removeAllMultiPlexDataBlocks, removeMultiPlexDataBlock, removeObservable, removeOutputDatablock, resetDataBlocks, saveViewerData, setCanMultiThread, setExternalProcess, setMultiplex, setParentDataBlock, setParentDataBlock, setProcessCheck, setProcessName, setSampleRate, setupProcess, toString, updateData
-
Constructor Details
-
RoccaWhistleSelect
-
-
Method Details
-
destroyProcess
public void destroyProcess()Description copied from class:PamProcess
Called from the PamControlled unit when a PamControlled unit is removed from the model. Offers an opportunity to disconnect individual processed from the rest of the model. May be necessary to override to clean up some processes.- Overrides:
destroyProcess
in classPamProcess
-
spectrogramNotification
public void spectrogramNotification(SpectrogramDisplay display, int downUp, int channel, long startMilliseconds, long duration, double f1, double f2, TDGraphFX tdDisplay) Original spectrogramNotification method.- Parameters:
display
-downUp
-channel
-startMilliseconds
-duration
-f1
-f2
-
-
spectrogramNotification
public boolean spectrogramNotification(SpectrogramDisplay display, MouseEvent mouseEvent, int downUp, int channel, long startMilliseconds, long duration, double f1, double f2, TDGraphFX tdDisplay) Updated spectrogramNotification method. Use as an overloaded method, passing variables back to original method- Specified by:
spectrogramNotification
in interfaceSpectrogramMarkObserver
- Parameters:
display
- spectrogram displaydownUp
- 0 = mouse down, 1 = mouse up, 2 = drag + button number in upper 16 bits.channel
- channel or sequence number, depending on the sourcestartMilliseconds
- start time in milliseconds.duration
- duration in milliseconds.f1
- min frequency in Hzf2
- max frequency in Hz- Returns:
- true if the user has popped up a menu or done something that should stop the sending display from carrying out any further actions on this mouse action (put in place to prevent the spectrogram menu popping up when editing marks in viewer mode).
-
getDataBlockSubset
Create a subset of the FFTDataBlock being displayed, based on the starting and ending times selected by the user- Parameters:
channel
- The channel the whistle was selected fromdisplay
- The spectrogram display object- Returns:
- a new FFTDataBlock containing only the FFTDataUnits between the start and end times, for the selected channel
-
getRawData
-
getMarkObserverName
- Specified by:
getMarkObserverName
in interfaceSpectrogramMarkObserver
- Returns:
- Name for the mark observer to show in the spectrogram dialog.
-
pamStart
public void pamStart()Description copied from class:PamProcess
Called for each process to tell it to start (may not be necessary for processes which are listening for data anyway).- Specified by:
pamStart
in classPamProcess
-
pamStop
public void pamStop()Description copied from class:PamProcess
Stops the process.- Specified by:
pamStop
in classPamProcess
-
canMark
public boolean canMark()- Specified by:
canMark
in interfaceSpectrogramMarkObserver
- Returns:
- whether or not it's possible to use this marker. Generally false when in viewer mode, but maynot always be.
-
getMarkName
Description copied from interface:SpectrogramMarkObserver
Name of the mark. Observers may have several mark types and might want to change the name to indicate what action will be taken when a mark is made- Specified by:
getMarkName
in interfaceSpectrogramMarkObserver
- Returns:
-