Package PamguardMVC
Class RawDataDisplay.RawDisplayPanel
java.lang.Object
Layout.DisplayPanel
PamguardMVC.RawDataDisplay.RawDisplayPanel
- All Implemented Interfaces:
 PamSettings,SettingsNameProvider,PamObserver
- Enclosing class:
 RawDataDisplay
public class RawDataDisplay.RawDisplayPanel
extends DisplayPanel
implements PamObserver, PamSettings
There may be several actual DisplayPanels if lots of 
 different displays all want one.
 The outer class must keep a list of them all.
- Author:
 - Doug Gillespie
 
- 
Field Summary
Fields inherited from class Layout.DisplayPanel
displayPanelContainer, displayPanelProvider, plotBackground - 
Constructor Summary
ConstructorsConstructorDescriptionRawDisplayPanel(DisplayPanelProvider displayPanelProvider, DisplayPanelContainer displayPanelContainer)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddData(PamObservable o, PamDataUnit dataUnit) Informs the PamObserver that new data have been added to the Observable classvoidcontainerNotification(DisplayPanelContainer displayContainer, int noteType) Not used - all timing is controlled by the arrival of new data blocks.protected JPopupMenuCreate a popup menu.voidThe displayPanelContainer should call destroyPanel when the panel is no longer required so that the displayPanel can unsubscribe to any data it was observing.protected voiddrawSamples(Graphics2D g2d, double[] wavData, int pixel, int startSample, int nSamples, int y0, double yScale) longImplementation of PamObserverImplementation of PamSettingslongvoidmasterClockUpdate(long milliSeconds, long sampleNumber) voidImplementation of PamObservervoidreceiveSourceNotification(int type, Object object) Receive a notification from the data source - typically a change in DAQ status.voidImplementation of PamObserverbooleanrestoreSettings(PamControlledUnitSettings pamControlledUnitSettings) protected voidsetAxisRange(double range) voidsetSampleRate(float sampleRate, boolean notify) New sample ratevoidupdateData(PamObservable observable, PamDataUnit pamDataUnit) Informs the PamObserver that existing data have been updatedMethods inherited from class Layout.DisplayPanel
clearImage, clearImage, clearImage, getDisplayImage, getDisplayPanelContainer, getDisplayPanelProvider, getInnerHeight, getInnerPanel, getInnerWidth, getNorthAxis, getPanel, getPanelBorder, getSouthAxis, prepareImage, repaint, repaint, setPanelBorder, spectrogramMousePosition 
- 
Constructor Details
- 
RawDisplayPanel
public RawDisplayPanel(DisplayPanelProvider displayPanelProvider, DisplayPanelContainer displayPanelContainer)  
 - 
 - 
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.
 
 - 
getObserverName
- Specified by:
 getObserverNamein interfacePamObserver
 - 
createPopupMenu
Description copied from class:DisplayPanelCreate a popup menu.This should be overridden in any sub classes that want to present a menu for setting any display options.
- Overrides:
 createPopupMenuin classDisplayPanel- Returns:
 - reference to the popup menu for the display panel
 
 - 
getRequiredDataHistory
Implementation of PamObserver- Specified by:
 getRequiredDataHistoryin interfacePamObserver- Parameters:
 arg- optional argument from PamObservable- Returns:
 - time in milliseconds required by data held in PamObservable
 
 - 
noteNewSettings
public void noteNewSettings()Implementation of PamObserver- Specified by:
 noteNewSettingsin interfacePamObserver
 - 
removeObservable
Implementation of PamObserver- 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.
 - 
masterClockUpdate
public void masterClockUpdate(long milliSeconds, long sampleNumber) - Specified by:
 masterClockUpdatein interfacePamObserver
 - 
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
 - 
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
 - 
setAxisRange
protected void setAxisRange(double range)  - 
drawSamples
protected void drawSamples(Graphics2D g2d, double[] wavData, int pixel, int startSample, int nSamples, int y0, double yScale)  - 
destroyPanel
public void destroyPanel()Description copied from class:DisplayPanelThe displayPanelContainer should call destroyPanel when the panel is no longer required so that the displayPanel can unsubscribe to any data it was observing.- Specified by:
 destroyPanelin classDisplayPanel
 - 
containerNotification
Not used - all timing is controlled by the arrival of new data blocks.- Specified by:
 containerNotificationin classDisplayPanel- Parameters:
 displayContainer-noteType-
 - 
getSettingsReference
Implementation of PamSettings- 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
 
 - 
getWestAxis
- Overrides:
 getWestAxisin classDisplayPanel
 - 
getEastAxis
- Overrides:
 getEastAxisin classDisplayPanel
 
 -