Class MnemonicHandler
java.lang.Object
com.formdev.flatlaf.MnemonicHandler
- All Implemented Interfaces:
KeyEventPostProcessor, EventListener, ChangeListener
Show/hide mnemonics.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static intprivate static WeakReference<Window> private static booleanprivate static booleanprivate static WindowListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean(package private) voidinstall()(package private) static booleanbooleanprivate booleanSpecial Alt key behavior on Windows.private static voidrepaintMnemonics(Container container) private boolean(package private) static voidshowMnemonics(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:
postProcessKeyEventin 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:
stateChangedin interfaceChangeListener
-
showMnemonics
-
repaintMnemonics
-
hasMnemonic
-