generalDatabase.lookupTables
Class LookupComponent
java.lang.Object
generalDatabase.lookupTables.LookupComponent
public class LookupComponent
- extends java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lookupTopic
private java.lang.String lookupTopic
mainPanel
private javax.swing.JPanel mainPanel
westPanel
private javax.swing.JPanel westPanel
codeField
private javax.swing.JTextField codeField
comboBox
private javax.swing.JComboBox comboBox
westLabel
private javax.swing.JLabel westLabel
northLabel
private javax.swing.JLabel northLabel
lookupList
private LookupList lookupList
selectedList
private java.util.Vector<LookupItem> selectedList
allowNullSelection
private boolean allowNullSelection
allowEdits
private boolean allowEdits
LookupComponent
public LookupComponent(java.lang.String lookupTopic)
getSelectedItem
public LookupItem getSelectedItem()
- Returns:
- The currently selected lookup item.
showPopupMenu
public void showPopupMenu(java.awt.event.MouseEvent me)
setComboFromCode
public boolean setComboFromCode()
findCodeIndex
private int findCodeIndex(java.lang.String code)
- find the index of a particular code in the selected list
- Parameters:
code - text from the code field
- Returns:
- index in the selected list or -1 if code not found
newListSelection
private void newListSelection(java.awt.event.ActionEvent arg0)
fillList
private void fillList()
getComponent
public javax.swing.JComponent getComponent()
setWestTitle
public void setWestTitle(java.lang.String westTitle)
setNorthTitle
public void setNorthTitle(java.lang.String northTitle)
isAllowNullSelection
public boolean isAllowNullSelection()
setAllowNullSelection
public void setAllowNullSelection(boolean allowNullSelection)
isAllowEdits
public boolean isAllowEdits()
setAllowEdits
public void setAllowEdits(boolean allowEdits)
setSelectedCode
public void setSelectedCode(java.lang.String codeText)
- Set the code manually, then let the comboBox part
update itself
- Parameters:
codeText -