Package rocca

Class RoccaControl

All Implemented Interfaces:
PamSettings, SettingsNameProvider

public class RoccaControl extends PamControlledUnit implements PamSettings
Main controller for Rocca
Author:
Michael Oswald
  • Field Details

    • unitType

      public static final String unitType
      Added 2014/09/11 - use in the constructor call to super class instead of the hard-coded string
      See Also:
  • Constructor Details

    • RoccaControl

      public RoccaControl(String name)
      Constructor
      Parameters:
      name -
  • Method Details

    • createDetectionMenu

      public JMenuItem 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.

    • getTabSpecificMenuBar

      public JMenuBar getTabSpecificMenuBar(Frame parentFrame, JMenuBar menuBar, PamGui pamGui)
      If we are in Viewer mode and a Click Detector module has been loaded, find the Click Detection menu item and add a Rocca Measurement submenu item to it
      Overrides:
      getTabSpecificMenuBar in class PamControlledUnit
      Parameters:
      menuBar - the standard menu for the Pam GUI.
      Returns:
      a complete menu bar to be shown while a particular tab is selected
    • addDetectorMenuItems

      public int addDetectorMenuItems(ClickControl clickControl, JMenu menu, int position)
      Adds a menu item when in viewer mode to the Click Detector menu, to pass events to Rocca for measurement. This is called from ClickControl. Note that this method has been copied from TargetMotionLocaliser.
      Parameters:
      clickControl - clickControl object calling this method
      menu - menu to add to
      position - where to add the new Rocca menu item
      Returns:
    • getMaxDataKeepTime

      public int getMaxDataKeepTime()
      A bit of a fudge to deal with some old code which kept doubling the keep time of the raw data, which eventually led to raw data using too much memory and bringing down PG. I don't fully understand that code so have left as much of it as possible, but put this in as an absolute maximum which cannot be exceeded.
      Returns:
      max in milliseconds as int, which is what's used in PAMDataBlock.
    • analyzeOfflineClicks

      public void analyzeOfflineClicks(OfflineEventDataUnit eventList)
      Parameters:
      eventList -
    • 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
    • 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
    • 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