Package docking

Class KeyEntryPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class KeyEntryPanel extends JPanel
A panel that holds a KeyEntryTextField and a button for clearing the current key binding.

This class is a drop-in replacement for clients that are currently using KeyEntryTextField.

See Also:
  • Constructor Details

    • KeyEntryPanel

      public KeyEntryPanel(int columns, KeyEntryListener listener)
      Constructs this class with a text field based on the number of given columns.
      Parameters:
      columns - the number of columns for the text field
      listener - the listener to be called as the user enters key strokes
  • Method Details

    • getTextField

      public JTextField getTextField()
      Returns the text field used by this class
      Returns:
      the text field
    • setKeyStroke

      public void setKeyStroke(KeyStroke ks)
      Sets the key stroke on this panel
      Parameters:
      ks - the key stroke
    • getKeyStroke

      public KeyStroke getKeyStroke()
      Gets the key stroke being used by this panel
      Returns:
      the key stroke
    • setDisabledHint

      public void setDisabledHint(String disabledHint)
      Sets the text field hint for this panel.
      Parameters:
      disabledHint - the hint
      See Also:
    • clearField

      public void clearField()
      Clears the key stroke being used by this panel