Like newJMenuItem() but adds shift as a modifier for the shortcut.
(String title, int what)
| 200 | * Like newJMenuItem() but adds shift as a modifier for the shortcut. |
| 201 | */ |
| 202 | static public JMenuItem newJMenuItemShift(String title, int what) { |
| 203 | JMenuItem menuItem = new JMenuItem(title); |
| 204 | int modifiers = awtToolkit.getMenuShortcutKeyMask(); |
| 205 | modifiers |= ActionEvent.SHIFT_MASK; |
| 206 | menuItem.setAccelerator(KeyStroke.getKeyStroke(what, modifiers)); |
| 207 | return menuItem; |
| 208 | } |
| 209 | |
| 210 | |
| 211 | /** |
no outgoing calls
no test coverage detected