Class UCDSelector

All Implemented Interfaces:
ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class UCDSelector extends JPanel implements ItemListener
A component which enables selection of a UCD by the user. This currently consists of an editable JComboBox which permits selection of one of the known UCDs or user entry of the ID of a new one. The description of the UCD, if known, is displayed near it too. At some point this component may get redesigned to permit hierarchical UCD browsing or better display of the UCD descriptions.
Author:
Mark Taylor (Starlink)
See Also:
  • Constructor Details

    • UCDSelector

      public UCDSelector()
      Constructs a new UCDSelector.
  • Method Details

    • getID

      public String getID()
      Returns the UCD ID selected by the user, or null if none is selected. Since the combobox is editable, this is not guaranteed to be the ID of an existing UCD. You can use the UCD.getUCD(java.lang.String) method to try to turn this ID into a UCD.
    • setID

      public void setID(String id)
      Sets the UCD ID currently entered in the selector to a given string.
      Parameters:
      id - UCD identifier
    • itemStateChanged

      public void itemStateChanged(ItemEvent evt)
      Specified by:
      itemStateChanged in interface ItemListener