public final class MnemonicHelper extends ComponentTreeWatcher
Modifier and Type | Field and Description |
---|---|
static Key<java.util.function.IntPredicate> |
MNEMONIC_CHECKER |
myControlsToIgnore
Constructor and Description |
---|
MnemonicHelper()
Deprecated.
do not use this object as a tree watcher
|
Modifier and Type | Method and Description |
---|---|
void |
checkForDuplicateMnemonics(javax.swing.AbstractButton button) |
void |
checkForDuplicateMnemonics(int mnemonic,
java.lang.String text) |
void |
checkForDuplicateMnemonics(javax.swing.JLabel label) |
static CustomShortcutSet |
createShortcut(char ch)
Creates shortcut for mnemonic replacing standard Alt+Letter to Ctrl+Alt+Letter on Mac with jdk version newer than 6
|
static int |
getFocusAcceleratorKeyMask() |
static boolean |
hasMnemonic(java.awt.Component component,
int keyCode) |
static void |
init(java.awt.Component component)
Initializes mnemonics support for the specified component and for its children if needed.
|
protected void |
processComponent(java.awt.Component component) |
static void |
registerMnemonicAction(javax.swing.JComponent component,
int mnemonic) |
protected void |
unprocessComponent(java.awt.Component component) |
processChildren, register, shouldBeIgnored
public static final Key<java.util.function.IntPredicate> MNEMONIC_CHECKER
@Deprecated public MnemonicHelper()
init(Component)
protected void processComponent(java.awt.Component component)
processComponent
in class ComponentTreeWatcher
protected void unprocessComponent(java.awt.Component component)
unprocessComponent
in class ComponentTreeWatcher
public void checkForDuplicateMnemonics(javax.swing.JLabel label)
public void checkForDuplicateMnemonics(javax.swing.AbstractButton button)
public void checkForDuplicateMnemonics(int mnemonic, java.lang.String text)
public static CustomShortcutSet createShortcut(char ch)
ch
- mnemonic letterpublic static void init(java.awt.Component component)
component
- the root component of the hierarchypublic static boolean hasMnemonic(java.awt.Component component, int keyCode)
public static int getFocusAcceleratorKeyMask()
public static void registerMnemonicAction(javax.swing.JComponent component, int mnemonic)