Package rocca
Class RoccaControl
java.lang.Object
PamController.PamControlledUnit
rocca.RoccaControl
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
Main controller for Rocca
- Author:
- Michael Oswald
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
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.void
analyzeOfflineClicks
(OfflineEventDataUnit eventList) createDetectionMenu
(Frame parentFrame) Create a JMenu object containing MenuItems associated with PamProcessesint
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.long
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 itvoid
notifyModelChanged
(int changeType) General notification when the PAMGAURD model changes.boolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) Methods inherited from class PamController.PamControlledUnit
addOfflineTaskGroup, addOtherRelatedMenuItems, addPamProcess, addPamProcess, addRelatedMenuItems, canClose, canPlayViewerSound, createDisplayMenu, createFileMenu, createHelpMenu, flushDataBlockBuffers, getBackupInformation, getFrameNumber, getGUI, getGuiFrame, getInstanceIndex, getModuleStatus, getModuleStatusManager, getModuleSummary, getModuleSummary, getNumOfflineTaskGroups, getNumPamProcesses, getOfflineState, getOfflineTaskGroup, getPamConfiguration, getPamController, getPamModuleInfo, getPamProcess, getPamView, getPlugin, getShortUnitType, getSidePanel, getTabClipCopier, getTabPanel, getToolbarComponent, getUnitName, getUnitType, getVerboseLevel, gotoTab, isInMainConfiguration, isNetRx, isViewer, pamClose, pamHasStopped, pamToStart, playViewerSound, removePamProcess, removeUnit, rename, saveViewerData, setFrameNumber, setModuleStatusManager, setPamConfiguration, setPamController, setPamModuleInfo, setPamView, setSidePanel, setTabPanel, setToolbarComponent, setupControlledUnit, stopViewerSound, tellModule, terminalPrint, terminalPrintln, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface PamController.PamSettings
getUnitType
Methods inherited from interface PamController.SettingsNameProvider
getUnitName
-
Field Details
-
unitType
Added 2014/09/11 - use in the constructor call to super class instead of the hard-coded string- See Also:
-
-
Constructor Details
-
RoccaControl
Constructor- Parameters:
name
-
-
-
Method Details
-
createDetectionMenu
Description copied from class:PamControlledUnit
Create a JMenu object containing MenuItems associated with PamProcesses- Overrides:
createDetectionMenu
in classPamControlledUnit
- 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
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 classPamControlledUnit
- Parameters:
menuBar
- the standard menu for the Pam GUI.- Returns:
- a complete menu bar to be shown while a particular tab is selected
-
addDetectorMenuItems
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 methodmenu
- menu to add toposition
- 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
- Parameters:
eventList
-
-
notifyModelChanged
public void notifyModelChanged(int changeType) Description copied from class:PamControlledUnit
General notification when the PAMGAURD model changes.- Overrides:
notifyModelChanged
in classPamControlledUnit
- Parameters:
changeType
- type of change
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- 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
-