Package docking

Class KeyEntryTextField

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, Scrollable, SwingConstants

public class KeyEntryTextField extends HintTextField
Text field captures key strokes and notifies a listener to process the key entry.
See Also:
  • Constructor Details

    • KeyEntryTextField

      public KeyEntryTextField(int columns, KeyEntryListener listener)
      Construct a new entry text field.
      Parameters:
      columns - number of columns in the text field
      listener - listener that is notified when the a key is pressed
  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
      Overrides:
      setEnabled in class JComponent
    • setDisabledHint

      public void setDisabledHint(String disabledHint)
      Sets the hint text that will be displayed when this field is disabled
      Parameters:
      disabledHint - the hint text
    • getKeyStroke

      public KeyStroke getKeyStroke()
      Get the current key stroke
      Returns:
      the key stroke
    • setKeyStroke

      public void setKeyStroke(KeyStroke ks)
      Sets the current key stroke
      Parameters:
      ks - the new key stroke
    • clearField

      public void clearField()