clickDetector
Class ClickControl

java.lang.Object
  extended by PamController.PamControlledUnit
      extended by clickDetector.ClickControl
All Implemented Interfaces:
PamSettings

public class ClickControl
extends PamControlledUnit
implements PamSettings

Main Controller for click detection.

ClickControl contains both the detector and the display panel. It also contains information on Detection and Display menus which will get added to the main PamGuard menu.

Author:
Doug Gillespie

Field Summary
protected  AngleVetoes angleVetoes
           
protected  ClickControl clickControl
           
protected  ClickDetector clickDetector
           
protected  ClickTabPanel clickPanel
           
protected  ClickParameters clickParameters
           
protected  ClickSidePanel clickSidePanel
           
protected  ClickTrainDetector clickTrainDetector
           
protected  JMenu rightMouseMenu
           
protected  ClickTabPanelControl tabPanelControl
           
protected  TrackedClickLocaliser trackedClickLocaliser
           
 
Constructor Summary
ClickControl(String name)
           
 
Method Summary
 void addOtherRelatedMenuItems(Frame parentFrame, JMenu menu, String name)
           
protected  void clickedOnClick(ClickDetection click)
           
 JMenu createDetectionMenu(Frame parentFrame)
          Create a JMenu object containing MenuItems associated with PamProcesses
 JMenu createDisplayMenu(Frame parentFrame)
          Create a JMenu object containing MenuItems associated with the view
 JMenuItem createHelpMenu(Frame parentFrame)
           
 void displayTriggerHistogram(TriggerHistogram[] triggerHistogram)
           
 PamDataBlock getClickDataBlock()
          Get the datablock containing click data
 ClickDetector getClickDetector()
           
 Serializable getSettingsReference()
           
 long getSettingsVersion()
           
 JMenuBar getTabSpecificMenuBar(Frame parentFrame, JMenuBar standardMenu, PamGui pamGui)
          Create a tab specific menu to go with this PamControlledUnit.
 int getTrueChannelNumber(int iCh)
           
protected  void newRawData(PamObservable source, PamDataUnit data)
           
 void notifyModelChanged(int changeType)
           
 void notifyNewStorage(String storageName)
           
 void pamStart()
           
 void pamStop()
           
 boolean restoreSettings(PamControlledUnitSettings pamControlledUnitSettings)
           
 void secondTimer(long sampleNumber)
           
 void setupControlledUnit()
          called for all PamControlledUnits after all units have been created.
 
Methods inherited from class PamController.PamControlledUnit
addPamProcess, addRelatedMenuItems, canClose, createFileMenu, getFrameNumber, getNumPamProcesses, getPamModuleInfo, getPamProcess, getPamView, getSidePanel, getTabPanel, getUnitName, getUnitType, gotoTab, pamHasStopped, pamToStart, removePamProcess, removeUnit, rename, setFrameNumber, setPamModuleInfo, setPamView, setSidePanel, setTabPanel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface PamController.PamSettings
getUnitName, getUnitType
 

Field Detail

clickDetector

protected ClickDetector clickDetector

clickTrainDetector

protected ClickTrainDetector clickTrainDetector

trackedClickLocaliser

protected TrackedClickLocaliser trackedClickLocaliser

tabPanelControl

protected ClickTabPanelControl tabPanelControl

clickParameters

protected ClickParameters clickParameters

rightMouseMenu

protected JMenu rightMouseMenu

clickPanel

protected ClickTabPanel clickPanel

clickControl

protected ClickControl clickControl

clickSidePanel

protected ClickSidePanel clickSidePanel

angleVetoes

protected AngleVetoes angleVetoes
Constructor Detail

ClickControl

public ClickControl(String name)
Method Detail

getClickDataBlock

public PamDataBlock getClickDataBlock()
Get the datablock containing click data

Returns:
Click data block

secondTimer

public void secondTimer(long sampleNumber)

getTrueChannelNumber

public int getTrueChannelNumber(int iCh)

displayTriggerHistogram

public void displayTriggerHistogram(TriggerHistogram[] triggerHistogram)

notifyNewStorage

public void notifyNewStorage(String storageName)

createDetectionMenu

public JMenu createDetectionMenu(Frame parentFrame)
Description copied from class: PamControlledUnit
Create a JMenu object containing MenuItems associated with PamProcesses

Overrides:
createDetectionMenu in class PamControlledUnit
Parameters:
parentFrame - The owner frame of the menu
Returns:
reference to a JMenu which can be added to an existing menu or menu bar

Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.


createHelpMenu

public JMenuItem createHelpMenu(Frame parentFrame)
Overrides:
createHelpMenu in class PamControlledUnit

createDisplayMenu

public JMenu createDisplayMenu(Frame parentFrame)
Description copied from class: PamControlledUnit
Create a JMenu object containing MenuItems associated with the view

Overrides:
createDisplayMenu in class PamControlledUnit
Returns:
reference to a JMenu which can be added to an existing menu or menu bar

Note that if multiple views are to use the same menu, then they should each create a new menu (by setting Create to true) the first time they call this method.


notifyModelChanged

public void notifyModelChanged(int changeType)
Overrides:
notifyModelChanged in class PamControlledUnit

getClickDetector

public ClickDetector getClickDetector()

newRawData

protected void newRawData(PamObservable source,
                          PamDataUnit data)

pamStart

public void pamStart()

pamStop

public void pamStop()

getSettingsVersion

public long getSettingsVersion()
Specified by:
getSettingsVersion in interface PamSettings
Returns:
An integer version number for the settings

getSettingsReference

public Serializable getSettingsReference()
Specified by:
getSettingsReference in interface PamSettings
Returns:
The serialisable object that will be stored

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

getTabSpecificMenuBar

public JMenuBar getTabSpecificMenuBar(Frame parentFrame,
                                      JMenuBar standardMenu,
                                      PamGui pamGui)
Description copied from class: PamControlledUnit
Create a tab specific menu to go with this PamControlledUnit.

Default is to throw back the standard menu to be used. This function should clone the standard menu and then modify the clone (usually by replacing the Display sub menu)

Overrides:
getTabSpecificMenuBar in class PamControlledUnit
standardMenu - the standard menu for the Pam GUI.
Returns:
a complete menu bar to be shown while a particular tab is selected

addOtherRelatedMenuItems

public void addOtherRelatedMenuItems(Frame parentFrame,
                                     JMenu menu,
                                     String name)
Overrides:
addOtherRelatedMenuItems in class PamControlledUnit

clickedOnClick

protected void clickedOnClick(ClickDetection click)

setupControlledUnit

public void setupControlledUnit()
Description copied from class: PamControlledUnit
called for all PamControlledUnits after all units have been created. This is a good time for the controlled units and processes to find and check their source data and the configuration generally since most onjects (i.e. output data blocks) should be in place

Overrides:
setupControlledUnit in class PamControlledUnit