Class ComboBoxAdaptor

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener

    public class ComboBoxAdaptor
    extends AbstractAutoCompleteAdaptor
    implements java.awt.event.ActionListener
    An implementation of the AbstractAutoCompleteAdaptor that is suitable for JComboBox.
    • Constructor Detail

      • ComboBoxAdaptor

        public ComboBoxAdaptor​(javax.swing.JComboBox comboBox)
        Creates a new ComobBoxAdaptor for the given combobox.
        Parameters:
        comboBox - the combobox that should be adapted
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent actionEvent)
        Implementation side effect - do not invoke.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Parameters:
        actionEvent - -
      • getItem

        public java.lang.Object getItem​(int index)
        Description copied from class: AbstractAutoCompleteAdaptor
        Returns the item at a given index. It is supposed that 0<=index<getItemCount().
        Specified by:
        getItem in class AbstractAutoCompleteAdaptor
        Parameters:
        index - the index of the item that is to be returned
        Returns:
        the item at the given index
      • getTextComponent

        public javax.swing.text.JTextComponent getTextComponent()
        Description copied from class: AbstractAutoCompleteAdaptor
        Returns the text component that is being used for the automatic completion.
        Specified by:
        getTextComponent in class AbstractAutoCompleteAdaptor
        Returns:
        the text component being used for the automatic completion