seismicVeto
Class VetoPluginPanelProvider.VetoPluginPanel

java.lang.Object
  extended by Layout.DisplayPanel
      extended by seismicVeto.VetoPluginPanelProvider.VetoPluginPanel
All Implemented Interfaces:
PamObserver
Enclosing class:
VetoPluginPanelProvider

public class VetoPluginPanelProvider.VetoPluginPanel
extends DisplayPanel
implements PamObserver

The class that actually does the display work.

Author:
Doug

Field Summary
(package private)  int[] lastPlottedValues
           
(package private)  int[] lastXValue
           
(package private)  double maxValue
           
(package private)  double minValue
           
private  VetoPluginPanelProvider vetoPluginPanelProvider
           
private  VetoProcess vetoProcess
           
(package private)  PamAxis westAxis
           
 
Fields inherited from class Layout.DisplayPanel
displayPanelContainer, displayPanelProvider, plotBackground
 
Constructor Summary
VetoPluginPanelProvider.VetoPluginPanel(VetoPluginPanelProvider vetoPluginPanelProvider, DisplayPanelContainer displayPanelContainer)
           
 
Method Summary
 void containerNotification(DisplayPanelContainer displayContainer, int noteType)
          Called by the DisplayPanelContainer whenever the scales change - e.g.
 void destroyPanel()
          The displayPanelContainer should call destroyPanel when the panel is no longer required so that the displayPanel can unsubscribe to any data it was observing.
 java.lang.String getObserverName()
           
 PamObserver getObserverObject()
           
 long getRequiredDataHistory(PamObservable o, java.lang.Object arg)
           
 PamAxis getWestAxis()
           
(package private)  int getYPixel(double value)
           
 void masterClockUpdate(long milliSeconds, long sampleNumber)
           
 void noteNewSettings()
           
 void removeObservable(PamObservable o)
          called when an Observable (PamDataBlock) is removed from the system
 void setSampleRate(float sampleRate, boolean notify)
          New sample rate
 void update(PamObservable o, PamDataUnit arg)
          new data have arrived - work out what channel it's from and plot it.
 
Methods inherited from class Layout.DisplayPanel
clearImage, clearImage, clearImage, createPopupMenu, getDisplayImage, getDisplayPanelContainer, getDisplayPanelProvider, getEastAxis, getInnerHeight, getInnerPanel, getInnerWidth, getNorthAxis, getPanel, getPanelBorder, getSouthAxis, repaint, repaint, setPanelBorder
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vetoPluginPanelProvider

private VetoPluginPanelProvider vetoPluginPanelProvider

vetoProcess

private VetoProcess vetoProcess

westAxis

PamAxis westAxis

minValue

double minValue

maxValue

double maxValue

lastPlottedValues

int[] lastPlottedValues

lastXValue

int[] lastXValue
Constructor Detail

VetoPluginPanelProvider.VetoPluginPanel

public VetoPluginPanelProvider.VetoPluginPanel(VetoPluginPanelProvider vetoPluginPanelProvider,
                                               DisplayPanelContainer displayPanelContainer)
Method Detail

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.

getWestAxis

public PamAxis getWestAxis()
Overrides:
getWestAxis in class DisplayPanel

containerNotification

public void containerNotification(DisplayPanelContainer displayContainer,
                                  int noteType)
Description copied from class: DisplayPanel
Called by the DisplayPanelContainer whenever the scales change - e.g. every time new data is drawn on the spectrogram.

The display panel can use this information in two ways:

Firstly, it should clear the region of the display just ahead of the current spectrogram x coordinate. Secondly, it may draw additional data on the display.

Specified by:
containerNotification in class DisplayPanel

getYPixel

int getYPixel(double value)

destroyPanel

public void destroyPanel()
Description copied from class: DisplayPanel
The 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:
destroyPanel in class DisplayPanel

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 data
arg - optional argument from PamObservable
Returns:
time in milliseconds requried by data held in PamObservable

noteNewSettings

public void noteNewSettings()
Specified by:
noteNewSettings in interface PamObserver

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)
new data have arrived - work out what channel it's from and plot it.

Specified by:
update in interface PamObserver
Parameters:
o - Reference to the Observable (a PamDataBlock)
arg - Reference to the new PamDataUnit