Package targetMotionModule.panels
Class EventControlPanel
java.lang.Object
targetMotionModule.panels.AbstractControlPanel
targetMotionModule.panels.EventControlPanel
- All Implemented Interfaces:
TargetMotionControlPanel
,TMDialogComponent
public class EventControlPanel
extends AbstractControlPanel
implements TMDialogComponent, TargetMotionControlPanel
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLocaliserMenuItem
(JPopupMenu menu, PamDataUnit selectedDetection) If we want to add a menu item to pop menu in another module then we need to check we can localise the detection, if so then add an option to the menu to localise the selected detection.boolean
canLocalise
(PamDataUnit dataUnit) Used primarily for offline processing.boolean
canRun()
boolean
void
Enable controls - based on event selection and other controlsgetPanel()
Get the panel from which the user can scroll through data in the datablockvoid
Refresh all the data in the control panel.void
saveData
(TargetMotionResult tmResult) Each control panel will have a different kind of data unit.void
setlayerPanelEnabled
(boolean enable) Enable or disable the panel.void
setNull()
If the current detection has saved localisation data then set it to null i.e.void
update
(int flag) Updates the panel depending on the integer flag.Methods inherited from class targetMotionModule.panels.AbstractControlPanel
createMainPanel, getLayerPanel, getMainPanel
-
Field Details
-
SEL_ONE_EVENT
public static final int SEL_ONE_EVENT- See Also:
-
SEL_ALL_EVENTS
public static final int SEL_ALL_EVENTS- See Also:
-
SEL_CHANGED_EVENTS
public static final int SEL_CHANGED_EVENTS- See Also:
-
-
Constructor Details
-
EventControlPanel
-
-
Method Details
-
setlayerPanelEnabled
public void setlayerPanelEnabled(boolean enable) Description copied from class:AbstractControlPanel
Enable or disable the panel. Panel enabled shows the normal panel with all components enabled. Disabling the panel adds an animation over the top of the panel, greys out the rest of the panel and disables all components.- Overrides:
setlayerPanelEnabled
in classAbstractControlPanel
-
getCurrentDetections
-
refreshData
public void refreshData()Description copied from interface:TargetMotionControlPanel
Refresh all the data in the control panel. This is called when offline data is loaded, a datablock is changed or data is added to a datablock.- Specified by:
refreshData
in interfaceTargetMotionControlPanel
-
getPanel
Description copied from interface:TargetMotionControlPanel
Get the panel from which the user can scroll through data in the datablock- Specified by:
getPanel
in interfaceTargetMotionControlPanel
- Specified by:
getPanel
in interfaceTMDialogComponent
- Returns:
- a panel to include in the main dialog
-
enableControls
public void enableControls()Description copied from interface:TMDialogComponent
Enable controls - based on event selection and other controls- Specified by:
enableControls
in interfaceTMDialogComponent
-
canRun
public boolean canRun()- Specified by:
canRun
in interfaceTMDialogComponent
- Returns:
- true if settigns on this panel think it's possible to start a run
-
update
public void update(int flag) Description copied from interface:TMDialogComponent
Updates the panel depending on the integer flag.- Specified by:
update
in interfaceTMDialogComponent
- Overrides:
update
in classAbstractControlPanel
-
saveData
Description copied from interface:TargetMotionControlPanel
Each control panel will have a different kind of data unit. saveData() is called whenever the 'save' button is pressed and saves localisation data in a format unique to the control panels' data block. e.g. click event data blocks save localisagtion info to the database.- Specified by:
saveData
in interfaceTargetMotionControlPanel
-
setNull
public void setNull()Description copied from interface:TargetMotionControlPanel
If the current detection has saved localisation data then set it to null i.e. get rid of it.- Specified by:
setNull
in interfaceTargetMotionControlPanel
-
checkDataLoadTime
-
addLocaliserMenuItem
If we want to add a menu item to pop menu in another module then we need to check we can localise the detection, if so then add an option to the menu to localise the selected detection.- Specified by:
addLocaliserMenuItem
in interfaceTargetMotionControlPanel
-
canLocalise
Description copied from interface:TargetMotionControlPanel
Used primarily for offline processing. Returns true if the dataunit can be localised. From the data unit the TargetMotionInformation can be determined. In the case of events this is relatively simple, however for single detections this may be more difficult. For example if using some automatic means to generate the array of detections required for target motion information- Specified by:
canLocalise
in interfaceTargetMotionControlPanel
-
getTargetMotionInfo
- Specified by:
getTargetMotionInfo
in interfaceTargetMotionControlPanel
- Returns:
- a list of all the detection shown in the control panel.
-