Package PamController

Class PamController

java.lang.Object
PamController.PamController
All Implemented Interfaces:
PamControllerInterface, PamSettings, SettingsNameProvider

public class PamController extends Object implements PamControllerInterface, PamSettings
Author:
Doug Gillespie

Main Pam Controller class which will communicate with the PamModelInterface and with the PamViewInterface

PamController contains a list of PamControlledUnit's each of which has it's own process, simpleMapRef.gpsTextPanel.setPixelsPerMetre(getPixelsPerMetre()); input and output data and display (Tab Panel, Menus, etc.)

See Also:
  • Field Details

  • Method Details

    • create

      public static void create(int runMode)
      Create an instance of the PAMController.
      Parameters:
      runMode - - the run mode
    • create

      public static void create(int runMode, Object object)
      Create an instance of the PAMcController.
      Parameters:
      runMode - - the run mode
      object - - extra information. Can be null.
    • setupPamguard

      public void setupPamguard()
      Setup the PAMController.
    • netReceiveStatus

      public void netReceiveStatus(long timeMilliseconds, int nPrepared, int nStarted, int nStopped)
      Called when the number of Networked remote stations changes so that the receiver can make a decision as to what to do in terms of preparing detectors, opening files, etc.
      Parameters:
      timeMilliseconds -
      nPrepared - number of remote stations currently prepared (called just before start)
      nStarted - number of remote stations currently started
      nStopped - number of remote stations currently stopped
    • canClose

      public boolean canClose()
      Can PAMGUARD shut down. This question is asked in turn to every module. Each module should attempt to make sure it can answer true, e.g. by closing files, but if any module returns false, then canClose() will return false;
      Returns:
      whether it's possible to close PAMGUARD without corrupting or losing data.
    • pamClose

      public void pamClose()
      Called after canClose has returned true to finally tell all modules that PAMGUARD is definitely closing down.so they can free any resources, etc.
      Specified by:
      pamClose in interface PamControllerInterface
    • shutDownPamguard

      public void shutDownPamguard()
      Shut down Pamguard
    • saveViewerData

      public void saveViewerData()
      Go through all data blocks in all modules and tell them to save. This has been built into PamProcess and PamDataBlock since we want it to be easy to override this for specific modules / processes / data blocks.
    • addControlledUnit

      public void addControlledUnit(PamControlledUnit controlledUnit)
      Description copied from interface: PamControllerInterface
      Adds a PamControlledUnit to the controller.
      Specified by:
      addControlledUnit in interface PamControllerInterface
      Parameters:
      controlledUnit - - Reference to a PamcontrolledUnit
    • addModule

      public PamControlledUnit addModule(Frame parentFrame, PamModuleInfo moduleInfo)
      Description copied from interface: PamControllerInterface
      Add a new PamControlledUnit
      Specified by:
      addModule in interface PamControllerInterface
      Parameters:
      moduleInfo - Information about the PamControlled unit to add
      Returns:
      true if created sucessfully
    • addModule

      public PamControlledUnit addModule(PamModuleInfo moduleInfo, String moduleName)
      Add a module to the controller.
      Parameters:
      moduleInfo - - the module info i.e. the type of module to add
      moduleName - - the module name.
      Returns:
    • removeControlledUnt

      public void removeControlledUnt(PamControlledUnit controlledUnit)
      Description copied from interface: PamControllerInterface
      Removes a PamControlledUnit from the controller
      Specified by:
      removeControlledUnt in interface PamControllerInterface
    • orderModules

      public boolean orderModules(Frame parentFrame)
      Description copied from interface: PamControllerInterface
      Take actions to alow the user to change the order modules apear in.
      Specified by:
      orderModules in interface PamControllerInterface
    • getControlledUnit

      public PamControlledUnit getControlledUnit(int iUnit)
      Description copied from interface: PamControllerInterface
      Returns a reference to a PamControlledUnit within the COntroller
      Specified by:
      getControlledUnit in interface PamControllerInterface
      Parameters:
      iUnit - Index of the unit
      Returns:
      reference to a PamControlledUnit
    • findControlledUnit

      public PamControlledUnit findControlledUnit(String unitType)
      Description copied from interface: PamControllerInterface
      Finds a PamControlledUnit of a given type but with any name
      Specified by:
      findControlledUnit in interface PamControllerInterface
      Parameters:
      unitType - Type of PamControlledUnit
      Returns:
      reference to PamControlledUnit
    • findControlledUnits

      public ArrayList<PamControlledUnit> findControlledUnits(String unitType)
      Get a list of PamControlledUnit units of a given type
      Parameters:
      unitType - Controlled unit type
      Returns:
      list of units.
    • findControlledUnits

      public ArrayList<PamControlledUnit> findControlledUnits(String unitType, String unitName)
      Get a list of PamControlledUnit units of a given type and name, allowing for nulls.
      Parameters:
      unitType - Controlled unit type, can be null for all units of name
      unitName - Controlled unit name, can be null for all units of type
      Returns:
      list of units.
    • findControlledUnit

      public PamControlledUnit findControlledUnit(String unitType, String unitName)
      Description copied from interface: PamControllerInterface
      Finds a PamControlledUnit of a given type and name
      Specified by:
      findControlledUnit in interface PamControllerInterface
      Parameters:
      unitType - Type of PamControlledUnit
      unitName - Name of PamControlledUnit
      Returns:
      reference to PamControlledUnit
    • findControlledUnit

      public PamControlledUnit findControlledUnit(Class unitClass, String unitName)
      Find the first instance of a module with a given class type and name.

      Name can be null in which case the first module with the correct class will be returned

      Parameters:
      unitClass - Module class (sub class of PamControlledUnit)
      unitName - Module Name
      Returns:
      Existing module with that class and name.
    • findControlledUnits

      public ArrayList<PamControlledUnit> findControlledUnits(Class unitClass)
      Get an Array list of PamControlledUnits of a particular class (exact matches only).
      Parameters:
      unitClass - PamControlledUnit class
      Returns:
      List of current instances of this class.
    • findControlledUnits

      public ArrayList<PamControlledUnit> findControlledUnits(Class unitClass, boolean includeSubClasses)
      Get an Array list of PamControlledUnits of a particular class (exact matches only).
      Parameters:
      unitClass - PamControlledUnit class
      Returns:
      List of current instances of this class.
    • isControlledUnit

      public boolean isControlledUnit(String controlName)
      Check whether a controlled unit exists based on it's name.
      Parameters:
      the - controlled unit name e.g. "my crazy click detector", not the default name.
    • getNumControlledUnits

      public int getNumControlledUnits()
      Description copied from interface: PamControllerInterface
      Gets the total number of PamControlledUnits
      Specified by:
      getNumControlledUnits in interface PamControllerInterface
      Returns:
      the number of PamControlledUnits
    • getInstance

      public static PamController getInstance()
    • getModelInterface

      public PamModel getModelInterface()
      Description copied from interface: PamControllerInterface
      Gets a reference to the PamModel (where all the data are stored and the algorithms are running)
      Specified by:
      getModelInterface in interface PamControllerInterface
      Returns:
      Reference to the PamGuard model
    • addView

      public void addView(PamViewInterface newView)
      Description copied from interface: PamControllerInterface
      Adds a new view to the system
      Specified by:
      addView in interface PamControllerInterface
    • showControlledUnit

      public void showControlledUnit(PamControlledUnit unit)
    • restartPamguard

      public void restartPamguard()
      Restart PAMguard. Can be called when something is mildly wrong such as a DAQ glitch, so that acquisition is stopped and restarted.
    • startLater

      public void startLater()
      calls pamStart using the SwingUtilities invokeLater command to start PAMGAURD later in the AWT event queue.
    • startLater

      public void startLater(boolean saveSettings)
    • stopLater

      public void stopLater()
      calls pamStop using the SwingUtilities invokeLater command to stop PAMGAURD later in the AWT event queue.
    • manualStart

      public boolean manualStart()
      Called from the start button. A little book keeping to distinguish this from automatic starts / restarts
      Specified by:
      manualStart in interface PamControllerInterface
      Returns:
      true if started.
    • manualStop

      public void manualStop()
      Called from the stop button. A little book keeping to distinguish this from automatic starts / restarts
      Specified by:
      manualStop in interface PamControllerInterface
    • pamStart

      public boolean pamStart()
      Start PAMGUARD. This function also gets called from the GUI menu start button and from the Network control system.

      As well as actually starting PAMGUARD it will write settings to the database and to the binary data store.

      Specified by:
      pamStart in interface PamControllerInterface
      Returns:
      true if all modules start successfully
    • pamStart

      public boolean pamStart(boolean saveSettings)
      Start PAMGuard with an option on saving settings.
      Parameters:
      saveSettings - flag to save settings to database and binary store
      Returns:
      true if all modules start successfully
    • pamStart

      public boolean pamStart(boolean saveSettings, long startTime)
      Starts PAMGuard, but with the option to save settings (to binary and to database) and also to give a specific start time for the session. When data are being received over the network, this may be in the past !
      Parameters:
      saveSettings - flag to say whether or not settings should be saved.
      startTime - start time in millis
      Returns:
      true if all modules start successfully
    • continueStart

      public boolean continueStart(boolean saveSettings, long startTime)
      Second half of the start process. This was originally in pamStart, but had to be split out, so that the reprocessManager checks can run in a separate thread in order to display a progress bar as files are catalogued.
      Parameters:
      saveSettings -
      startTime -
      Returns:
    • pamStop

      public void pamStop()
      Stopping PAMGUARD. Harder than you might think ! First a pamStop() is sent to all processes, then once that's done, a pamHasStopped is sent to all Controllers.

      This is necessary when running in a multi-thread mode since some processes may still be receiving data and may still pass if on to other downstream processes, storage, etc.

      Specified by:
      pamStop in interface PamControllerInterface
    • dumpBufferStatus

      public void dumpBufferStatus(String message, boolean sayEmpties)
      Look in every data block, particularly threaded ones, and dump the buffer status. This will have to go via PamProcess so that additional information can be added from any processes that hold additional data in other internal buffers.
      Parameters:
      message - Message to print prior to dumping buffers for debug.
      sayEmpties - dump info even if a buffer is empty (otherwise, only ones that have stuff still)
    • batchProcessingComplete

      public void batchProcessingComplete()
    • exportGeneralXMLSettings

      public void exportGeneralXMLSettings(JFrame parentFrame, long timeMillis)
      Export configuration into an XML file
      Parameters:
      parentFrame -
      timeMillis - time stamp that will get added to file name and content.
    • findBinaryStorePath

      public String findBinaryStorePath()
      Find the path to the binary store ....
      Returns:
      path to the binary store.
    • findSettingsSources

      public ArrayList<PamSettingsSource> findSettingsSources()
      Returns:
      a list of PamControlledUnits which implements the PamSettingsSource interface
      See Also:
    • modelSettings

      public boolean modelSettings(JFrame frame)
      Description copied from interface: PamControllerInterface
      Menu command to open dialog to adjust model settings
      Specified by:
      modelSettings in interface PamControllerInterface
      Returns:
      true if dialog returned Ok.
    • pamStarted

      public void pamStarted()
      Description copied from interface: PamControllerInterface
      Notification received from the model that data collection has started.
      Specified by:
      pamStarted in interface PamControllerInterface
    • pamEnded

      public void pamEnded()
      Description copied from interface: PamControllerInterface
      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
      Specified by:
      pamEnded in interface PamControllerInterface
    • getFFTDataBlocks

      public ArrayList<PamDataBlock> getFFTDataBlocks()
      Specified by:
      getFFTDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain FFT data.
    • getFFTDataBlock

      public PamDataBlock getFFTDataBlock(int id)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getFFTDataBlock in interface PamControllerInterface
      Returns:
      an FFT data block at index id within Pamguards list of FFT type data blocks
    • getFFTDataBlock

      public PamDataBlock getFFTDataBlock(String name)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getFFTDataBlock in interface PamControllerInterface
      Returns:
      the first FFT data block at with the given name within Pamguards list of FFT type data blocks
    • getRawDataBlocks

      public ArrayList<PamDataBlock> getRawDataBlocks()
      Specified by:
      getRawDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain raw audio data.
    • getRawDataBlock

      public PamRawDataBlock getRawDataBlock(int id)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getRawDataBlock in interface PamControllerInterface
      Returns:
      a raw data block at index id within Pamguards list of RAW type data blocks
    • getRawDataBlock

      public PamRawDataBlock getRawDataBlock(String name)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getRawDataBlock in interface PamControllerInterface
      Returns:
      the first raw data block at with the given name within Pamguards list of RAW type data blocks
    • getDetectorDataBlocks

      public ArrayList<PamDataBlock> getDetectorDataBlocks()
      Specified by:
      getDetectorDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain detector output data.
    • getDetectorDataBlock

      public PamDataBlock getDetectorDataBlock(int id)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getDetectorDataBlock in interface PamControllerInterface
      Returns:
      PamDataBlock -- a detector data block at index id within Pamguard's list of RAW type data blocks.
    • getDetectorDataBlock

      public PamDataBlock getDetectorDataBlock(String name)
      Description copied from interface: PamControllerInterface
      Gets a specific data block from the list, or null.
      Specified by:
      getDetectorDataBlock in interface PamControllerInterface
      Returns:
      PamDataBlock -- the first detector data block with the given name within Pamguard's list of DETECTOR type data blocks.
    • getDetectorEventDataBlocks

      public ArrayList<PamDataBlock> getDetectorEventDataBlocks()
      Specified by:
      getDetectorEventDataBlocks in interface PamControllerInterface
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain data of a specific type.
    • getDetectorEventDataBlock

      public PamDataBlock getDetectorEventDataBlock(int id)
      Specified by:
      getDetectorEventDataBlock in interface PamControllerInterface
    • getDetectorEventDataBlock

      public PamDataBlock getDetectorEventDataBlock(String name)
      Specified by:
      getDetectorEventDataBlock in interface PamControllerInterface
    • getDataBlocks

      public ArrayList<PamDataBlock> getDataBlocks(Class blockType, boolean includeSubClasses)
      Description copied from interface: PamControllerInterface
      Returns an ArrayList of PamDataBlocks from all PamProcesses in all PamControlledUnits that contain data of a specific type. In order to return a list of PamDataBlocks that contain objects implementing a certain interface (such as AcousticDataUnit or PamDetection), the includeSubClasses boolean must be TRUE
      Specified by:
      getDataBlocks in interface PamControllerInterface
      Parameters:
      blockType - DataType of PamDatablock
      includeSubClasses - whether or not to include classes that extend/implement the blockType parameter.
      Returns:
      List of PamDataBlocks in all PamProcesses in all PamControlledUnits that contain data of a specific type.
    • getDataBlocks

      public ArrayList<PamDataBlock> getDataBlocks()
      Specified by:
      getDataBlocks in interface PamControllerInterface
      Returns:
      All data blocks
    • getPlottableDataBlocks

      public ArrayList<PamDataBlock> getPlottableDataBlocks(GeneralProjector generalProjector)
    • getDataBlock

      public PamDataBlock getDataBlock(Class blockType, int id)
      Find a block of a given type with the id number, or null if the number is out of range.
      Specified by:
      getDataBlock in interface PamControllerInterface
      Parameters:
      blockType -
      id - -- the block id number
      Returns:
      block, which you may want to cast to a subtype
    • getDataBlock

      public PamDataBlock getDataBlock(Class blockType, String name)
      Find a block of a given type with the given name, or null if it doesn't exist.
      Specified by:
      getDataBlock in interface PamControllerInterface
      Parameters:
      blockType - -- RAW, FFT, DETECTOR, null, etc.
      name - -- the block name
      Returns:
      block, which you may want to cast to a subtype
    • getDataBlockByLongName

      public PamDataBlock getDataBlockByLongName(String longName)
      Find a block with the given long name, or null if it doesn't exist.
      Parameters:
      longName - the long name of the PamDataBlock
      Returns:
      block
    • findOfflineDataStores

      public ArrayList<OfflineDataStore> findOfflineDataStores()
      Returns:
      a list of offline data sources.
    • findOfflineDataStore

      public OfflineDataStore findOfflineDataStore(Class sourceClass)
    • updateDataMap

      public void updateDataMap()
      Updates the entire datamap.
    • createDataMap

      public void createDataMap()
      Create the datamap from the database
    • notifyModelChanged

      public void notifyModelChanged(int changeType)
      Description copied from interface: PamControllerInterface
      Tell the controller that the model may have changed (i.e. a process connection changed, or a process added, etc.) This will be passes on to the view and used by the controller as necessary.

      Specified by:
      notifyModelChanged in interface PamControllerInterface
      See Also:
      • invalid @see
        values are
         
        1. CHANGED_PROCESS_SETTINGS
        2. ADD_PROCESS
        3. REMOVE_PROCESS
        4. ADD_DATABLOCK
        5. REMOVE_DATABLOCK
        6. ADD_CONTROLLEDUNIT
        7. REMOVE_CONTROLLEDUNIT
        8. REORDER_CONTROLLEDUNITS
        9. INITIALIZATION_COMPLETE
        10. DESTROY_EVERYTHING
        11. RENAME_CONTROLLED_UNIT
        12. NEW_VIEW_TIMES
        13. NEW_VIEW_TIME
        14. CHANGED_DISPLAY_SETTINGS
        15. CHANGED_MULTI_THREADING
        16. HYDROPHONE_ARRAY_CHANGED
        17. EXTERNAL_DATA_LOADED
    • moduleChange

      public boolean moduleChange(int changeType)
      Has there been a module change AFTER initial module loading.
      Parameters:
      changeType -
      Returns:
      true if modules added or removed after initialisation complete
    • setupGarbageCollector

      public void setupGarbageCollector()
    • getSettingsReference

      public 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
    • getUnitName

      public String getUnitName()
      Specified by:
      getUnitName in interface SettingsNameProvider
      Returns:
      A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
    • getUnitType

      public String getUnitType()
      Specified by:
      getUnitType in interface PamSettings
      Returns:
      A Name specific to the type, e.g. Click detector
    • 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
    • destroyModel

      public void destroyModel()
    • totalModelRebuild

      public void totalModelRebuild()
      Description copied from interface: PamControllerInterface
      Do a total rebuild of the Pam model based on the contents of the set settings file.
      Specified by:
      totalModelRebuild in interface PamControllerInterface
    • getPamStatus

      public int getPamStatus()
      returns the status of Pamguard. The available status' will depend on the run mode. For instance, if run mode is RUN_NORMAL then status can be either PAM_IDLE or PAM_RUNNING.
      Returns:
      Pamguard status
    • setPamStatus

      public void setPamStatus(int pamStatus)
    • getRealStatus

      public int getRealStatus()
      This was within the StatusCommand class, but useful to have it here since it's needed in more than one place. In viewer mode at startup there are a number of things going on in different threads, such as the creation of datamaps, and this can (hopefully) handle those bespoke goings on.
      Returns:
      program status for multithreaded statup tasks.
    • getRunMode

      public int getRunMode()
      Gets the Pamguard running mode. This is set at startup (generally through slightly different versions of the main class). It will be one of RUN_NORMAL RUN_PAMVIEW RUN_MIXEDMODE
      Returns:
      Pamguards run mode
    • getRunModeName

      public String getRunModeName()
    • isInitializationComplete

      public boolean isInitializationComplete()
    • dialogOKButtonPressed

      public void dialogOKButtonPressed()
      Called from PamDialog whenever the OK button is pressed. Don't do anything immediately to give the module that opened the dialog time to respond to it's closing (e.g. make the new settings from the dialog it's default). Use invokeLater to send out a message as soon as the awt que is clear.
    • enableGUIControl

      public void enableGUIControl(boolean enable)
      Enables / Disables GUI for input. This is used when data are being loaded in viewer mode to prevetn impatient users from clicking on extra things while long background processes take place.

      Many of the processes loading data are run in the background in SwingWorker threads scheduled with the AWTScheduler so that they are able to update progress on teh screen

      Parameters:
      enable - enable or disable the GUI.
    • loadOldSettings

      public void loadOldSettings(PamSettingsGroup settingsGroup)
      Called to load a specific set of PAMGUARD settings in viewer mode, which were previously loaded in from a database or binary store.
      Parameters:
      settingsGroup - settings information
      initialiseNow - Immediately data are loaded, initialise which will load data from storages.
    • loadOldSettings

      public void loadOldSettings(PamSettingsGroup settingsGroup, boolean initialiseNow)
      Called to load a specific set of PAMGUARD settings in viewer mode, which were previously loaded in from a database or binary store.
      Parameters:
      settingsGroup - settings information
      initialiseNow - Immediately data are loaded, initialise which will load data from storages.
    • exportSettingsAsXML

      public void exportSettingsAsXML(PamSettingsGroup settingsGroup)
      Load settings for all modules in this group, then export as XML.
      Parameters:
      settingsGroup -
    • getPSFName

      public String getPSFName()
      Get the name of the psf or database used to contain settings for this run.
      Returns:
      name of psf or database
    • getPSFNameWithPath

      public String getPSFNameWithPath()
      Get the name of the psf or database used to contain settings for this run.
      Returns:
      name of psf or database
    • toolBarStartButton

      public void toolBarStartButton(PamControlledUnit currentControlledUnit)
    • toolBarStopButton

      public void toolBarStopButton(PamControlledUnit currentControlledUnit)
    • storageOptions

      public void storageOptions(JFrame parentFrame)
      invalid input: '<'invalid input: '<'invalid input: '<'invalid input: '<'invalid input: '<'invalid input: '<'invalid input: '<' Updated upstream Respond to storage options dialog. Selects whether data are stored in binary, database or both
      Parameters:
      parentFrame - ======= Respond to storage options dialog. Selects whethere data are stored in binary, database or both
      parentFrame - >>>>>>> Stashed changes
    • exportData

      public void exportData(JFrame parentFrame)
      Show export options tp export data to other formats
      Parameters:
      parentFrame -
    • getVerboseLevel

      public int getVerboseLevel()
      Return a verbose level for debug output
      Returns:
      a verbose level for debug output.
    • createWatchDog

      public void createWatchDog()
      Create a watchdog which will run independently and keep this thing going !
    • getUidManager

      public UIDManager getUidManager()
      Returns:
      the uidManager
    • getUnitBeingLoaded

      public PamControlledUnit getUnitBeingLoaded()
      Returns the module that is currently being loaded. If null, it means we aren't loading anything right now
      Returns:
    • clearLoadedUnit

      public void clearLoadedUnit()
      Clears the variable holding info about the unit currently being loaded
    • getJCompliance

      public double getJCompliance()
      Get the Java compliance, i.e. what Java version is running.
      Returns:
      integer value of java version e.g. Java 8 is return 1.8
    • notifyTaskProgress

      public void notifyTaskProgress(PamTaskUpdate progress)
      Notify the PamController that progress has been made in loading something.
      Parameters:
      progress - - holds progress info.
    • checkIfNetworkControlled

      public static boolean checkIfNetworkControlled()
      Check if PAMGuard is being controlled through the network
      Returns:
      true if network controlled, false otherwise
    • getInstallFolder

      public String getInstallFolder()
      Returns the current installation folder, or null if there was a problem determining the folder location. Note that the default file separator is included at the end of the string.
      Returns:
    • getMainFrame

      public static Frame getMainFrame()
      Get the main frame if there is one. Can be used by dialogs when no one else has sorted out a frame reference to pass to them.
      Returns:
      reference to main GUI frame.
    • getGuiFrameManager

      public GuiFrameManager getGuiFrameManager()
      Description copied from interface: PamControllerInterface
      Get the GUI Frame manager.
      Specified by:
      getGuiFrameManager in interface PamControllerInterface
      Returns:
      GUIFrameManager
    • sortFrameTitles

      public void sortFrameTitles()
    • getGuiManagerFX

      @Deprecated public PamGuiManagerFX getGuiManagerFX()
      Deprecated.
      FX Gui
    • getMainStage

      public static javafx.stage.Stage getMainStage()
    • setInstallFolder

      public void setInstallFolder(String installFolder)
      Set the install folder.
      Parameters:
      installFolder -
    • getGlobalTimeManager

      public GlobalTimeManager getGlobalTimeManager()
      Returns:
      the globalTimeManager
    • isManualStop

      public boolean isManualStop()
      Returns:
      the manualStop
    • setManualStop

      public void setManualStop(boolean manualStop)
      Parameters:
      manualStop - the manualStop to set
    • getWatchdogComms

      public WatchdogComms getWatchdogComms()
      Returns:
      the watchdogComms
    • getGlobalMediumManager

      public GlobalMediumManager getGlobalMediumManager()
      Get the global medium manager. This indicates whether PG is being used in air or water and handles things like dB references, default sound speed etc.
      Returns:
      the global medium manager;
    • getPamConfiguration

      public PamConfiguration getPamConfiguration()
      Gt the main PAMGuard configuration (list of connected modules).
      Returns:
      the pamConfiguration
    • updateMasterClock

      public void updateMasterClock(long timeInMillis)
      Gets called on a timer when NOT processing from files. OR if processing files, gets called whenever the Calendar session start time or file time millis gets updated.
      Parameters:
      timeInMillis -