public interface PamControllerInterface
Contoller interface for Pamguard. Any controller working with the Pamguard MVC should implement these methods in order that the model and the view can communicate with the controller
Modifier and Type | Field and Description |
---|---|
static int |
ADD_CONTROLLEDUNIT
Automatically sent when a PamControlledUnit is added
|
static int |
ADD_DATABLOCK
Automatically sent when a PamDataBlock is added
|
static int |
ADD_PROCESS
Automatically sent when a PamProcess is added
|
static int |
CHANGED_DISPLAY_SETTINGS
Sent when display settings are changed (for instance altering of a symbol)
so that graphic components can redraw.
|
static int |
CHANGED_MULTI_THREADING
Sent when the data model has changed between single and multi threading.
|
static int |
CHANGED_OFFLINE_DATASTORE
Sent when either the database or the binary store has updated
and finished making a new map of its data.
|
static int |
CHANGED_PROCESS_SETTINGS
Should be sent by the developer when a process alters it's configuration in any way
so that downstream processes can adjust acordingly
|
static int |
DATA_LOAD_COMPLETE
Notification sent out when new offline data have
been loaded.
|
static int |
DESTROY_EVERYTHING
Sent when all PamControlledUnits have been removed from the model.
|
static int |
EXTERNAL_DATA_IMPORTED
Called whenever external data is imported into PAMGUARD and saved into the database and/or binary store.
|
static int |
HYDROPHONE_ARRAY_CHANGED
Called whenever the dialog box of the hydrophone array editor is closed (not cancelled).
|
static int |
INITIALIZATION_COMPLETE
Automatically sent when PAMGAURD has finished loading it's
initial settings file and created the GUI
|
static int |
INITIALIZE_LOADDATA
Called at startup in the viewer in the AWT thread should come
after the data maps have been made.
|
static int |
MASTER_REFERENCE_CHANGED
Master reference point has updated (either changed type of
reference or been updated in some way).
|
static int |
NEW_SCROLL_TIME
Sent in viewer mode when the view time slider is dragged
|
static int |
OFFLINE_DATA_LOADED
Notification sent out when new offline data have
been loaded.
|
static int |
REMOVE_CONTROLLEDUNIT
Automatically sent when a PamControlledUnit is removed
|
static int |
REMOVE_DATABLOCK
Automatically sent when a PamDataBlock is removed
|
static int |
REMOVE_PROCESS
Automatically sent when a PamProcess is removed
|
static int |
RENAME_CONTROLLED_UNIT
Automatically sent when a PamControlledUnit is renamed.
|
static int |
REORDER_CONTROLLEDUNITS
Automatically added when PamControlledUnits are re-ordered
|
Modifier and Type | Method and Description |
---|---|
void |
addControlledUnit(PamControlledUnit controlledUnit)
Adds a PamControlledUnit to the controller.
|
boolean |
addModule(java.awt.Frame parentFrame,
PamModuleInfo moduleInfo)
Add a new PamControlledUnit
|
void |
addView(PamViewInterface newView)
Adds a new view to the system
|
PamControlledUnit |
findControlledUnit(java.lang.String unitType)
Finds a PamControlledUnit of a given type but with any name
|
PamControlledUnit |
findControlledUnit(java.lang.String unitType,
java.lang.String unitName)
Finds a PamControlledUnit of a given type and name
|
PamControlledUnit |
getControlledUnit(int iUnit)
Returns a reference to a PamControlledUnit within the COntroller
|
PamDataBlock |
getDataBlock(java.lang.Class blockType,
int id)
Find a block of a given type with the id number, or null if the number
is out of range.
|
PamDataBlock |
getDataBlock(java.lang.Class blockType,
java.lang.String name)
Find a block of a given type with the given name, or null if it
doesn't exist.
|
java.util.ArrayList<PamDataBlock> |
getDataBlocks() |
java.util.ArrayList<PamDataBlock> |
getDataBlocks(java.lang.Class blockType,
boolean includeSubClasses) |
PamDataBlock |
getDetectorDataBlock(int id)
Gets a specific data block from the list, or null.
|
PamDataBlock |
getDetectorDataBlock(java.lang.String name)
Gets a specific data block from the list, or null.
|
java.util.ArrayList<PamDataBlock> |
getDetectorDataBlocks() |
PamDataBlock |
getDetectorEventDataBlock(int id) |
PamDataBlock |
getDetectorEventDataBlock(java.lang.String name) |
java.util.ArrayList<PamDataBlock> |
getDetectorEventDataBlocks() |
PamDataBlock |
getFFTDataBlock(int id)
Gets a specific data block from the list, or null.
|
PamDataBlock |
getFFTDataBlock(java.lang.String name)
Gets a specific data block from the list, or null.
|
java.util.ArrayList<PamDataBlock> |
getFFTDataBlocks() |
GuiFrameManager |
getGuiFrameManager()
Get the GUI Frame manager.
|
PamModelInterface |
getModelInterface()
Gets a reference to the PamModel (where all the data are stored and the
algorithms are running)
|
int |
getNumControlledUnits()
Gets the total number of PamControlledUnits
|
PamRawDataBlock |
getRawDataBlock(int id)
Gets a specific data block from the list, or null.
|
PamRawDataBlock |
getRawDataBlock(java.lang.String name)
Gets a specific data block from the list, or null.
|
java.util.ArrayList<PamDataBlock> |
getRawDataBlocks() |
boolean |
modelSettings(javax.swing.JFrame frame)
Menu command to open dialog to adjust model settings
|
void |
notifyModelChanged(int changeType)
Tell the controller that the model may have changed (i.e.
|
boolean |
orderModules(java.awt.Frame parentFrame)
Take actions to alow the user to change the order modules apear in.
|
void |
pamClose()
Close all modules and free up resources.
|
void |
pamEnded()
Sent from the model when Pam ends - this can happen when a file finishes
or after Pam ends following a PamStop command sent by the controller
|
boolean |
pamStart()
Instruction to the controller (probably from a menu command inthe view)
that data collection should start.
|
void |
pamStarted()
Notification recieved from the model that data collection has started.
|
void |
pamStop()
Instruction to the controller (probably from a menu command inthe view)
that data collection should stop.
|
void |
removeControlledUnt(PamControlledUnit controlledUnit)
Removes a PamControlledUnit from the controller
|
void |
totalModelRebuild()
Do a total rebuild of the Pam model based on the contents of
the set settings file.
|
static final int CHANGED_PROCESS_SETTINGS
static final int ADD_PROCESS
static final int REMOVE_PROCESS
static final int ADD_DATABLOCK
static final int REMOVE_DATABLOCK
static final int ADD_CONTROLLEDUNIT
static final int REMOVE_CONTROLLEDUNIT
static final int REORDER_CONTROLLEDUNITS
static final int INITIALIZATION_COMPLETE
static final int DESTROY_EVERYTHING
static final int RENAME_CONTROLLED_UNIT
static final int INITIALIZE_LOADDATA
static final int OFFLINE_DATA_LOADED
Also see DATA__LOAD_COMPLETE which is sent around within the same worker thread and therefore executes BEFORE this one.
static final int CHANGED_DISPLAY_SETTINGS
static final int CHANGED_MULTI_THREADING
static final int CHANGED_OFFLINE_DATASTORE
static final int NEW_SCROLL_TIME
static final int DATA_LOAD_COMPLETE
also see OFFLINE_DATA_LOADED which is sent around a little later in the AWT thread once the worker thread has completed.
static final int HYDROPHONE_ARRAY_CHANGED
static final int MASTER_REFERENCE_CHANGED
static final int EXTERNAL_DATA_IMPORTED
void addControlledUnit(PamControlledUnit controlledUnit)
controlledUnit
- -
Reference to a PamcontrolledUnitvoid addView(PamViewInterface newView)
newView
- void removeControlledUnt(PamControlledUnit controlledUnit)
controlledUnit
- PamControlledUnit getControlledUnit(int iUnit)
iUnit
- Index of the unitPamControlledUnit findControlledUnit(java.lang.String unitType)
unitType
- Type of PamControlledUnitPamControlledUnit findControlledUnit(java.lang.String unitType, java.lang.String unitName)
unitType
- Type of PamControlledUnitunitName
- Name of PamControlledUnitint getNumControlledUnits()
PamModelInterface getModelInterface()
boolean pamStart()
void pamStop()
boolean modelSettings(javax.swing.JFrame frame)
void pamStarted()
void pamEnded()
boolean orderModules(java.awt.Frame parentFrame)
boolean addModule(java.awt.Frame parentFrame, PamModuleInfo moduleInfo)
moduleInfo
- Information about the PamControlled unit to addGuiFrameManager getGuiFrameManager()
java.util.ArrayList<PamDataBlock> getFFTDataBlocks()
PamDataBlock getFFTDataBlock(int id)
id
- PamDataBlock getFFTDataBlock(java.lang.String name)
name
- java.util.ArrayList<PamDataBlock> getRawDataBlocks()
PamRawDataBlock getRawDataBlock(int id)
id
- PamRawDataBlock getRawDataBlock(java.lang.String name)
name
- java.util.ArrayList<PamDataBlock> getDetectorDataBlocks()
PamDataBlock getDetectorDataBlock(int id)
id
- PamDataBlock getDetectorDataBlock(java.lang.String name)
name
- java.util.ArrayList<PamDataBlock> getDetectorEventDataBlocks()
PamDataBlock getDetectorEventDataBlock(int id)
PamDataBlock getDetectorEventDataBlock(java.lang.String name)
java.util.ArrayList<PamDataBlock> getDataBlocks(java.lang.Class blockType, boolean includeSubClasses)
blockType
- DataType of PamDatablockPamDataBlock getDataBlock(java.lang.Class blockType, int id)
blockType
- id
- -- the block id numberPamDataBlock getDataBlock(java.lang.Class blockType, java.lang.String name)
blockType
- -- RAW, FFT, DETECTOR, null, etc.name
- -- the block namejava.util.ArrayList<PamDataBlock> getDataBlocks()
void notifyModelChanged(int changeType)
values are
- CHANGED_PROCESS_SETTINGS
- ADD_PROCESS
- REMOVE_PROCESS
- ADD_DATABLOCK
- REMOVE_DATABLOCK
- ADD_CONTROLLEDUNIT
- REMOVE_CONTROLLEDUNIT
- REORDER_CONTROLLEDUNITS
- INITIALIZATION_COMPLETE
- DESTROY_EVERYTHING
- RENAME_CONTROLLED_UNIT
- NEW_VIEW_TIMES
- NEW_VIEW_TIME
- CHANGED_DISPLAY_SETTINGS
- CHANGED_MULTI_THREADING
- HYDROPHONE_ARRAY_CHANGED
- EXTERNAL_DATA_LOADED
void totalModelRebuild()
void pamClose()