Package ca.corbett.extras.demo.panels
Class KeyStrokeManagerPanel
java.lang.Object
ca.corbett.extras.demo.panels.PanelBuilder
ca.corbett.extras.demo.panels.KeyStrokeManagerPanel
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 Summary
Constructors -
Method Summary
Methods inherited from class ca.corbett.extras.demo.panels.PanelBuilder
buildFormPanel, buildFormPanel, buildHighlightedHeaderLabel, createSnippetLabel, createSnippetLabel
-
Constructor Details
-
KeyStrokeManagerPanel
public KeyStrokeManagerPanel()
-
-
Method Details
-
getTitle
Description copied from class:PanelBuilderReturns a name for this PanelBuilder.- Specified by:
getTitlein classPanelBuilder- Returns:
- A hopefully descriptive name.
-
build
Description copied from class:PanelBuilderBuilds and returns the FormPanel (or technically any JPanel) for this builder.- Specified by:
buildin classPanelBuilder- Returns:
- A populated JPanel (or FormPanel).
-