Class ListAdaptor

All Implemented Interfaces:
EventListener, ListSelectionListener

public class ListAdaptor extends AbstractAutoCompleteAdaptor implements ListSelectionListener
An implementation of the AbstractAutoCompleteAdaptor that is suitable for a JList in conjunction with a JTextComponent.
  • Field Details

    • list

      JList list
      the list containing the items
    • textComponent

      JTextComponent textComponent
      the text component that is used for automatic completion
    • stringConverter

      ObjectToStringConverter stringConverter
      the converter used to transform items to strings
  • Constructor Details

    • ListAdaptor

      public ListAdaptor(JList list, JTextComponent textComponent)
      Creates a new JListAdaptor for the given list and text component.
      Parameters:
      list - the list that contains the items that are used for automatic completion
      textComponent - the text component that will be used automatic completion
    • ListAdaptor

      public ListAdaptor(JList list, JTextComponent textComponent, ObjectToStringConverter stringConverter)
      Creates a new JListAdaptor for the given list and text component.
      Parameters:
      list - the list that contains the items that are used for automatic completion
      textComponent - the text component that will be used automatic completion
      stringConverter - the converter used to transform items to strings
  • Method Details