Class DropDownSelectionTextField<T>

Type Parameters:
T - The type of object that this model manipulates
All Implemented Interfaces:
GComponent, ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants
Direct Known Subclasses:
DropDownMultiSelectionTextField

public class DropDownSelectionTextField<T> extends DropDownTextField<T>
A text field that handles comparing text typed by the user to the list of objects and then presenting potential matches in a drop down window. This class differs from its parent in that it allows the user to select items from the popup list.

Usage note: Typically this text field will not be used directly, but will instead be used indirectly by way of an editor. If this field is used directly, then the user should use DropDownTextField.setSelectedValue(Object) and DropDownTextField.getSelectedValue() to get and set data on this field, rather than calling DropDownTextField.setText(String) and JTextComponent.getText().

Usage notes:

  • Pressing ENTER with the drop-down list open will select and item and close the list
  • Pressing ENTER with the drop-down list not showing will trigger an editingStopped() event, signaling that the user has made a choice
  • Pressing ESCAPE with the drop-down list open will close the list
  • Pressing ESCAPE with the drop-down list not showing will trigger an editingCancelled() event, signaling that the user has cancelled editing
See Also: