public final class MenuExtensions extends Object
MenuExtensions.| Constructor and Description |
|---|
MenuExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static void |
setAccelerator(JMenuItem jmi,
char keyChar)
Sets the accelerator for the given menuitem and the given key char.
|
static void |
setAccelerator(JMenuItem jmi,
Character keyChar,
int modifiers)
Sets the accelerator for the given menuitem and the given key char and the given modifiers.
|
static void |
setAccelerator(JMenuItem jmi,
int keyCode,
int modifiers)
Sets the accelerator for the given menuitem and the given key code and the given modifiers.
|
static void |
setAccelerator(JMenuItem jmi,
int keyCode,
int modifiers,
boolean onKeyRelease)
Sets the accelerator for the given menuitem and the given keyCode and the given modifiers.
|
static void |
setAccelerator(JMenuItem jmi,
String parsableKeystrokeString)
Sets the accelerator for the given menuitem and the given parsable keystroke string.
|
static void |
setAltAccelerator(JMenuItem jmi,
char accelerator)
Sets the accelerator for the given menuitem and the given character with the ALT.
|
static void |
setCtrlAccelerator(JMenuItem jmi,
char accelerator)
Sets the accelerator for the given menuitem and the given character with the CTRL.
|
public static void setAccelerator(JMenuItem jmi, char keyChar)
jmi - The JMenuItem.keyChar - the key charpublic static void setAccelerator(JMenuItem jmi, Character keyChar, int modifiers)
jmi - The JMenuItem.keyChar - the key charmodifiers - the modifierspublic static void setAccelerator(JMenuItem jmi, int keyCode, int modifiers)
jmi - The JMenuItem.keyCode - the key codemodifiers - the modifierspublic static void setAccelerator(JMenuItem jmi, int keyCode, int modifiers, boolean onKeyRelease)
jmi - The JMenuItem.keyCode - the key codemodifiers - the modifiersonKeyRelease - true if the KeyStroke should represent a key release, false otherwise.public static void setAccelerator(JMenuItem jmi, String parsableKeystrokeString)
jmi - The JMenuItem.parsableKeystrokeString - the parsable keystroke stringpublic static void setAltAccelerator(JMenuItem jmi, char accelerator)
jmi - The JMenuItem.accelerator - The character that have to push together with the ALT.public static void setCtrlAccelerator(JMenuItem jmi, char accelerator)
jmi - The JMenuItem.accelerator - The character that have to push together with the CTRL.Copyright © 2015–2018 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.