likelihoodDetectionModule
Class LikelihoodDetectionUnit

java.lang.Object
  extended by PamController.PamControlledUnit
      extended by likelihoodDetectionModule.LikelihoodDetectionUnit
All Implemented Interfaces:
PamSettings

public class LikelihoodDetectionUnit
extends PamControlledUnit
implements PamSettings

The class LikelihoodDetectionUnit implements that standard PamControlledUnit functionality required by PamGuard for a plug-in module.


Nested Class Summary
 class LikelihoodDetectionUnit.ProcessGroup
          The ProcessGroup objects is used by the controlling unit to keep track of one or more set of detection processes for a target configuration.
(package private)  class LikelihoodDetectionUnit.SettingsAction
          The SettingsAction class is the action listener that is attached to the module's menu entry, and is invoked by PamGuard to allow the user to configure the module's parameters.
 
Field Summary
private static LikelihoodFFTController fftController
          The fft controller for the module.
private  boolean firstNotification
          A flag indicating whether the controller has received its first notification from the PamGuard system.
private  boolean isConfiguring
          A flag indicating whether the controller is in the middle of configuring itself.
private  boolean isInitialized
          A flag indicating whether the controller has been initialized.
private  LikelihoodDetectionParameters likelihoodDetectionParameters
          The likelihood detection parameters for the module.
private  java.lang.String name
          The name assigned to the controller.
private  java.util.HashMap<java.lang.String,LikelihoodDetectionUnit.ProcessGroup> processes
          A map of processes groups, organized by the name of the target configuration that they are for.
private  boolean selfNotification
          A flag indicating whether the controller has received its first notification from itself via the PamGuard system.
 
Fields inherited from class PamController.PamControlledUnit
isViewer
 
Constructor Summary
LikelihoodDetectionUnit(java.lang.String name)
          Instantiates a new likelihood detection unit.
 
Method Summary
private  void addProcessingGroup(java.lang.String configName, LikelihoodDetectionUnit.ProcessGroup processes)
          Adds a processing group to the list of active processing streams.
private  void configure()
          Configure the controlling unit (module).
 javax.swing.JMenuItem createDetectionMenu(java.awt.Frame parentFrame)
          Create a JMenu object containing MenuItems associated with PamProcesses
 LikelihoodDetectionParameters getParameters()
          Returns the configured LikelihoodDetectionParameters for the module.
 java.io.Serializable getSettingsReference()
           
 long getSettingsVersion()
           
 void notifyModelChanged(int changeType)
          General notification when the PAMGAURD model changes.
private  void removeAllProcessingGroups()
          Removes the all processing groups.
 boolean restoreSettings(PamControlledUnitSettings settings)
           
 
Methods inherited from class PamController.PamControlledUnit
addOtherRelatedMenuItems, addPamProcess, addRelatedMenuItems, canClose, createDisplayMenu, createFileMenu, createHelpMenu, fillXMLElement, fillXMLParameters, getFrameNumber, getNumPamProcesses, getPamController, getPamModuleInfo, getPamProcess, getPamView, getSidePanel, getTabClipCopier, getTabPanel, getTabSpecificMenuBar, getUnitName, getUnitType, gotoTab, notifyArrayChanged, pamHasStopped, pamToStart, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setupControlledUnit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface PamController.PamSettings
getUnitName, getUnitType
 

Field Detail

likelihoodDetectionParameters

private LikelihoodDetectionParameters likelihoodDetectionParameters
The likelihood detection parameters for the module.


fftController

private static LikelihoodFFTController fftController
The fft controller for the module.


isConfiguring

private boolean isConfiguring
A flag indicating whether the controller is in the middle of configuring itself.


isInitialized

private boolean isInitialized
A flag indicating whether the controller has been initialized.


firstNotification

private boolean firstNotification
A flag indicating whether the controller has received its first notification from the PamGuard system.


selfNotification

private boolean selfNotification
A flag indicating whether the controller has received its first notification from itself via the PamGuard system.


name

private java.lang.String name
The name assigned to the controller.


processes

private java.util.HashMap<java.lang.String,LikelihoodDetectionUnit.ProcessGroup> processes
A map of processes groups, organized by the name of the target configuration that they are for.

Constructor Detail

LikelihoodDetectionUnit

public LikelihoodDetectionUnit(java.lang.String name)
Instantiates a new likelihood detection unit.

Parameters:
name - The assigned name of the detection module.
Method Detail

configure

private void configure()
Configure the controlling unit (module). This function goes out into the system and gets the information necessary from the acquisition source and the constructs a processing stream for each of the user-configured target configurations.


getParameters

public LikelihoodDetectionParameters getParameters()
Returns the configured LikelihoodDetectionParameters for the module.

Returns:
the parameters
See Also:
LikelihoodDetectionParameters

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

restoreSettings

public boolean restoreSettings(PamControlledUnitSettings settings)
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

createDetectionMenu

public javax.swing.JMenuItem createDetectionMenu(java.awt.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.


notifyModelChanged

public void notifyModelChanged(int changeType)
Description copied from class: PamControlledUnit
General notification when the PAMGAURD model changes.

Overrides:
notifyModelChanged in class PamControlledUnit
Parameters:
changeType - type of change

addProcessingGroup

private void addProcessingGroup(java.lang.String configName,
                                LikelihoodDetectionUnit.ProcessGroup processes)
Adds a processing group to the list of active processing streams.

Parameters:
configName - the config name
processes - the processes

removeAllProcessingGroups

private void removeAllProcessingGroups()
Removes the all processing groups.