Package generalDatabase.lookupTables
Class LookupComponent
java.lang.Object
generalDatabase.lookupTables.LookupComponent
Lookup component to go in dialogs, Logger forms, etc.
Has the look and feel of Logger drop down boxes but lots of extra features, such as being editable and updatable on the fly, etc.
- Author:
- Doug Gillespie
-
Constructor Summary
ConstructorDescriptionLookupComponent
(String lookupTopic, LookupList lookupList) Make a lookup component which won't auto-update.LookupComponent
(String lookupTopic, LookupList lookupList, boolean autoUpdate) Make a lookup list with an option to auto-update automatically whenever there is a change to this list within PAMGuard, e.g. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(LookupChangeListener changeListener) Add a change listener to receive notifications whenever the lookup selection changes.void
fillList()
boolean
boolean
boolean
void
removeChangeListener
(LookupChangeListener changeListener) Remove a change listener that received notifications whenever the lookup selection changes.void
setAllowEdits
(boolean allowEdits) void
setAllowNullSelection
(boolean allowNullSelection) boolean
void
setLookupList
(LookupList lookupList) void
setNorthTitle
(String northTitle) void
setNullSelectionText
(String nullSelectionText) void
setSelectedCode
(String codeText) Set the code manually, then let the comboBox part update itselfvoid
setShowCodePanel
(boolean showCode) Set whether or not to show the code panel to the left of the main drop down.void
setToolTipText
(String hint) void
setToolTipText
(String codeHint, String comboHint) void
void
setWestTitle
(String westTitle) void
-
Constructor Details
-
LookupComponent
Make a lookup list with an option to auto-update automatically whenever there is a change to this list within PAMGuard, e.g. if the same topic is used in multiple controls.- Parameters:
lookupTopic
- lookup topiclookupList
- lookup listautoUpdate
- flag to auto update in the event of changes.
-
LookupComponent
Make a lookup component which won't auto-update.- Parameters:
lookupTopic
- lookup topiclookupList
- lookup list
-
-
Method Details
-
getLookupList
- Returns:
- the lookupList
-
setLookupList
- Parameters:
lookupList
- the lookupList to set
-
setShowCodePanel
public void setShowCodePanel(boolean showCode) Set whether or not to show the code panel to the left of the main drop down.- Parameters:
showCode
- show the code panel
-
isShowCodePanel
public boolean isShowCodePanel()- Returns:
- true if the code panel is shown.
-
getSelectedItem
- Returns:
- The currently selected lookup item.
-
showPopupMenu
-
setComboFromCode
public boolean setComboFromCode() -
fillList
public void fillList() -
getComponent
-
setWestTitle
-
setNorthTitle
-
isAllowNullSelection
public boolean isAllowNullSelection() -
setAllowNullSelection
public void setAllowNullSelection(boolean allowNullSelection) -
isAllowEdits
public boolean isAllowEdits() -
setAllowEdits
public void setAllowEdits(boolean allowEdits) -
setSelectedCode
Set the code manually, then let the comboBox part update itself- Parameters:
codeText
-
-
getSelectedList
- Returns:
- the selectedList
-
setToolTipText
-
setToolTipText
-
setTopic
-
addChangeListener
Add a change listener to receive notifications whenever the lookup selection changes.- Parameters:
changeListener
- change listener
-
removeChangeListener
Remove a change listener that received notifications whenever the lookup selection changes.- Parameters:
changeListener
- change listener
-
getNullSelectionText
- Returns:
- the nullSelectionText
-
setNullSelectionText
- Parameters:
nullSelectionText
- the nullSelectionText to set
-