Class KeyStrokeManagerPanel

java.lang.Object
ca.corbett.extras.demo.panels.PanelBuilder
ca.corbett.extras.demo.panels.KeyStrokeManagerPanel

public class KeyStrokeManagerPanel extends PanelBuilder
This demo panel shows off the KeyStrokeManager class, which makes it easy to register and manage keyboard shortcut handlers for any window.

A note about memory management - for this little demo app, our KeyStrokeManager is created and attached to the DemoApp window itself, so it effectively lives for the duration of the application. In a real application, you should invoke the KeyStrokeManager's dispose() method if your KeyStrokeManager is attached to a window that may be closed and discarded during the application's lifetime. This will ensure that all references held by the KeyStrokeManager are released, allowing the window to be garbage collected properly.

Since:
swing-extras 2.7
Author:
scorbo2
  • Constructor Details

    • KeyStrokeManagerPanel

      public KeyStrokeManagerPanel()
  • Method Details

    • getTitle

      public String getTitle()
      Description copied from class: PanelBuilder
      Returns a name for this PanelBuilder.
      Specified by:
      getTitle in class PanelBuilder
      Returns:
      A hopefully descriptive name.
    • build

      public JPanel build()
      Description copied from class: PanelBuilder
      Builds and returns the FormPanel (or technically any JPanel) for this builder.
      Specified by:
      build in class PanelBuilder
      Returns:
      A populated JPanel (or FormPanel).