Class LookupComponent

java.lang.Object
generalDatabase.lookupTables.LookupComponent

public class LookupComponent extends 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
  • Constructor Details Link icon

    • LookupComponent Link icon

      public 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. if the same topic is used in multiple controls.
      Parameters:
      lookupTopic - lookup topic
      lookupList - lookup list
      autoUpdate - flag to auto update in the event of changes.
    • LookupComponent Link icon

      public LookupComponent(String lookupTopic, LookupList lookupList)
      Make a lookup component which won't auto-update.
      Parameters:
      lookupTopic - lookup topic
      lookupList - lookup list
  • Method Details Link icon

    • getLookupList Link icon

      public LookupList getLookupList()
      Returns:
      the lookupList
    • setLookupList Link icon

      public void setLookupList(LookupList lookupList)
      Parameters:
      lookupList - the lookupList to set
    • setShowCodePanel Link icon

      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 Link icon

      public boolean isShowCodePanel()
      Returns:
      true if the code panel is shown.
    • getSelectedItem Link icon

      public LookupItem getSelectedItem()
      Returns:
      The currently selected lookup item.
    • showPopupMenu Link icon

      public void showPopupMenu(MouseEvent me)
    • setComboFromCode Link icon

      public boolean setComboFromCode()
    • fillList Link icon

      public void fillList()
    • getComponent Link icon

      public JComponent getComponent()
    • setWestTitle Link icon

      public void setWestTitle(String westTitle)
    • setNorthTitle Link icon

      public void setNorthTitle(String northTitle)
    • isAllowNullSelection Link icon

      public boolean isAllowNullSelection()
    • setAllowNullSelection Link icon

      public void setAllowNullSelection(boolean allowNullSelection)
    • isAllowEdits Link icon

      public boolean isAllowEdits()
    • setAllowEdits Link icon

      public void setAllowEdits(boolean allowEdits)
    • setSelectedCode Link icon

      public void setSelectedCode(String codeText)
      Set the code manually, then let the comboBox part update itself
      Parameters:
      codeText -
    • getSelectedList Link icon

      public Vector<LookupItem> getSelectedList()
      Returns:
      the selectedList
    • setToolTipText Link icon

      public void setToolTipText(String hint)
    • setToolTipText Link icon

      public void setToolTipText(String codeHint, String comboHint)
    • setTopic Link icon

      public void setTopic(String topicName)
    • addChangeListener Link icon

      public void addChangeListener(LookupChangeListener changeListener)
      Add a change listener to receive notifications whenever the lookup selection changes.
      Parameters:
      changeListener - change listener
    • removeChangeListener Link icon

      public void removeChangeListener(LookupChangeListener changeListener)
      Remove a change listener that received notifications whenever the lookup selection changes.
      Parameters:
      changeListener - change listener
    • getNullSelectionText Link icon

      public String getNullSelectionText()
      Returns:
      the nullSelectionText
    • setNullSelectionText Link icon

      public void setNullSelectionText(String nullSelectionText)
      Parameters:
      nullSelectionText - the nullSelectionText to set