Package PamguardMVC.dataSelector
Class DataSelector
java.lang.Object
PamguardMVC.dataSelector.DataSelector
- Direct Known Subclasses:
AnnotationDataSelector
,ClickDataSelector
,ClickTrainDataSelector
,ClickTrainDataSelector2
,CompoundDataSelector
,ControlDataSelector
,CPODDataSelector
,CTDataSelector
,DifarDataSelector
,FormDataSelector
,FormsDataSelector
,Group3DDataSelector
,RWDataSelector
,SuperDetDataSelector
,WMDDataSelector
,WslClsDataSelector
Standard classed which are attached to a datablock and can be
used to select certain types of data unit (e.g. clicks of
a particular type or whistles within a particular frequency band)
- Author:
- Doug Gillespie
-
Constructor Summary
ConstructorDescriptionDataSelector
(PamDataBlock pamDataBlock, String selectorName, boolean allowScores) Create a data selector for a DataBlock. -
Method Summary
Modifier and TypeMethodDescriptionfindDataSelector
(Class selectorClass) Find a data selector within a data selector.Get descriptive text about the data selector which can be added to dialogs and other information panels.getDialogButton
(Window parentWindow) Create a settings type button that can be inserted into a larger dialog.getDialogButton
(Window parentWindow, DataSelectorChangeListener changeListener) Create a settings type button that can be inserted into a larger dialog.abstract DynamicSettingsPane<Boolean>
abstract PamDialogPanel
Need a longer more unique name when making compound data selectors, particularly those which are pulling in multiple similar super detections which might be from different datablocks, but might be given the same name.getMenuItem
(Window parentFrame, DataSelectorChangeListener changeListener) Get a menu item for the data selector that can be easily added to any other menu.abstract DataSelectParams
Get selection parameters for more organised centralised storage.This is the name used to identify the data selector in a hash table of all data selectors for a specific datablock so should be the unique name of the display in order that each display can use a different selection.This is a title for the data selector which can be used in dialogs.getSQLSelectClause
(SQLTypes sqlTypes) Get a database clause which can be used with a database Query for this data type.boolean
abstract double
scoreData
(PamDataUnit pamDataUnit) Score a PAMDataUnit.abstract void
setParams
(DataSelectParams dataSelectParams) Set selection parameters from centralised storage.void
setSelectorTitle
(String selectorTitle) This is a title for the data selector which can be used in dialogs.final boolean
showSelectDialog
(Window frame)
-
Constructor Details
-
DataSelector
Create a data selector for a DataBlock. If allowScores is true, then the selector MAY (but may not) offer a more complicated dialog panel that has score values for each thing selected rather than just yes / no's.- Parameters:
pamDataBlock
-selectorName
-allowScores
-
-
-
Method Details
-
getSQLSelectClause
Get a database clause which can be used with a database Query for this data type. These may easily end up in an inner join, so in the clause, spell out column names in full.- Returns:
- a database clause.
-
setParams
Set selection parameters from centralised storage.- Parameters:
dataSelectParams
-
-
getParams
Get selection parameters for more organised centralised storage. This must never be null since all selectors have an enable / disable options added to them automatically in their dialogs.- Returns:
-
getDialogPanel
- Returns:
- a dialog panel which can be used in a wider dialog
-
getDialogPaneFX
- Returns:
- a FX pane which can be used in a wider dialog
-
findDataSelector
Find a data selector within a data selector. This is primarily for use with ComoundDataSelector objects which may encapsulate multiple other selectors, particularly when annotations are in use. but it's needed here so that it can be called on any DataSelector object.- Parameters:
selectorClass
- class to data selector to find.- Returns:
- DataSelector or null if that class of data selector doesn't exist.
-
getMenuItem
Get a menu item for the data selector that can be easily added to any other menu.- Parameters:
parentFrame
-- Returns:
- menu item
-
showSelectDialog
-
getDescription
Get descriptive text about the data selector which can be added to dialogs and other information panels.- Returns:
- descriptive text. Default is a xml dump of params.
-
scoreData
Score a PAMDataUnit. this is used in preference to a boolean select function so that the user can add different return flags. Generally 0 indicates false.- Parameters:
pamDataUnit
- - the input data unit.- Returns:
- score of data out. 0 usually indicates false.
-
getPamDataBlock
- Returns:
- the pamDataBlock
-
getSelectorName
This is the name used to identify the data selector in a hash table of all data selectors for a specific datablock so should be the unique name of the display in order that each display can use a different selection.- Returns:
- the selectorName
-
getSelectorTitle
This is a title for the data selector which can be used in dialogs. This can be different to the name, since the name is generally the display, which we know anyway. Particularly with complicated compound data selectors, it's useful to have a more informative name for various sub-components.- Returns:
- title to use in dialog components.
-
setSelectorTitle
This is a title for the data selector which can be used in dialogs. This can be different to the name, since the name is generally the display, which we know anyway. Particularly with complicated compound data selectors, it's useful to have a more informative name for various sub-components.- Parameters:
selectorTitle
-
-
getLongSelectorName
Need a longer more unique name when making compound data selectors, particularly those which are pulling in multiple similar super detections which might be from different datablocks, but might be given the same name.- Returns:
-
isAllowScores
public boolean isAllowScores()- Returns:
- the allowScores
-
getDialogButton
Create a settings type button that can be inserted into a larger dialog.- Parameters:
parentWindow
-
-
getDialogButton
Create a settings type button that can be inserted into a larger dialog.- Parameters:
parentWindow
-
-