Package de.alpharogroup.swing.menu
Class MenuExtensions
- java.lang.Object
-
- de.alpharogroup.swing.menu.MenuExtensions
-
public final class MenuExtensions extends java.lang.ObjectThe classMenuExtensions.
-
-
Constructor Summary
Constructors Constructor Description MenuExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidsetAccelerator(javax.swing.JMenuItem jmi, char keyChar)Sets the accelerator for the given menuitem and the given key char.static voidsetAccelerator(javax.swing.JMenuItem jmi, int keyCode, int modifiers)Sets the accelerator for the given menuitem and the given key code and the given modifiers.static voidsetAccelerator(javax.swing.JMenuItem jmi, int keyCode, int modifiers, boolean onKeyRelease)Sets the accelerator for the given menuitem and the given keyCode and the given modifiers.static voidsetAccelerator(javax.swing.JMenuItem jmi, java.lang.Character keyChar, int modifiers)Sets the accelerator for the given menuitem and the given key char and the given modifiers.static voidsetAccelerator(javax.swing.JMenuItem jmi, java.lang.String parsableKeystrokeString)Sets the accelerator for the given menuitem and the given parsable keystroke string.static voidsetAltAccelerator(javax.swing.JMenuItem jmi, char accelerator)Sets the accelerator for the given menuitem and the given character with the ALT.static voidsetCtrlAccelerator(javax.swing.JMenuItem jmi, char accelerator)Sets the accelerator for the given menuitem and the given character with the CTRL.
-
-
-
Method Detail
-
setAccelerator
public static void setAccelerator(javax.swing.JMenuItem jmi, char keyChar)Sets the accelerator for the given menuitem and the given key char.- Parameters:
jmi- The JMenuItem.keyChar- the key char
-
setAccelerator
public static void setAccelerator(javax.swing.JMenuItem jmi, java.lang.Character keyChar, int modifiers)Sets the accelerator for the given menuitem and the given key char and the given modifiers.- Parameters:
jmi- The JMenuItem.keyChar- the key charmodifiers- the modifiers
-
setAccelerator
public static void setAccelerator(javax.swing.JMenuItem jmi, int keyCode, int modifiers)Sets the accelerator for the given menuitem and the given key code and the given modifiers.- Parameters:
jmi- The JMenuItem.keyCode- the key codemodifiers- the modifiers
-
setAccelerator
public static void setAccelerator(javax.swing.JMenuItem jmi, int keyCode, int modifiers, boolean onKeyRelease)Sets the accelerator for the given menuitem and the given keyCode and the given modifiers.- Parameters:
jmi- The JMenuItem.keyCode- the key codemodifiers- the modifiersonKeyRelease- true if the KeyStroke should represent a key release, false otherwise.
-
setAccelerator
public static void setAccelerator(javax.swing.JMenuItem jmi, java.lang.String parsableKeystrokeString)Sets the accelerator for the given menuitem and the given parsable keystroke string.- Parameters:
jmi- The JMenuItem.parsableKeystrokeString- the parsable keystroke string
-
setAltAccelerator
public static void setAltAccelerator(javax.swing.JMenuItem jmi, char accelerator)Sets the accelerator for the given menuitem and the given character with the ALT. The accelerator are combined with the given character and the ALT.- Parameters:
jmi- The JMenuItem.accelerator- The character that have to push together with the ALT.
-
setCtrlAccelerator
public static void setCtrlAccelerator(javax.swing.JMenuItem jmi, char accelerator)Sets the accelerator for the given menuitem and the given character with the CTRL. The accelerator are combined with the given character and the CTRL.- Parameters:
jmi- The JMenuItem.accelerator- The character that have to push together with the CTRL.
-
-