Package com.formdev.flatlaf
Class MnemonicHandler
java.lang.Object
com.formdev.flatlaf.MnemonicHandler
- All Implemented Interfaces:
KeyEventPostProcessor
,EventListener
,ChangeListener
Show/hide mnemonics.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int
private static WeakReference
<Window> private static boolean
private static boolean
private static WindowListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
(package private) void
install()
(package private) static boolean
boolean
private boolean
Special Alt key behavior on Windows.private static void
repaintMnemonics
(Container container) private boolean
(package private) static void
showMnemonics
(boolean show, Component c) void
(package private) void
-
Field Details
-
showMnemonics
private static boolean showMnemonics -
lastShowMnemonicWindow
-
windowListener
-
altPressedEventCount
private static int altPressedEventCount -
selectMenuOnAltReleased
private static boolean selectMenuOnAltReleased
-
-
Constructor Details
-
MnemonicHandler
MnemonicHandler()
-
-
Method Details
-
isShowMnemonics
static boolean isShowMnemonics() -
install
void install() -
uninstall
void uninstall() -
postProcessKeyEvent
- Specified by:
postProcessKeyEvent
in interfaceKeyEventPostProcessor
-
shouldShowMnemonics
-
processKeyEventOnWindows
Special Alt key behavior on Windows. Press-and-release Alt key selects first menu (if available) and moves focus temporary to menu bar. If menu bar has focus (some menu is selected), pressing Alt key unselects menu and moves focus back to permanent focus owner. -
stateChanged
- Specified by:
stateChanged
in interfaceChangeListener
-
showMnemonics
-
repaintMnemonics
-
hasMnemonic
-