A software engineer, somewhere, needs to have their abstraction taken away. Who crafts the sort of API that would require a five-line helper function just to set the shortcut key for a menu item?
(String title, int what)
| 177 | * menu item? |
| 178 | */ |
| 179 | static public JMenuItem newJMenuItem(String title, int what) { |
| 180 | JMenuItem menuItem = new JMenuItem(title); |
| 181 | int modifiers = awtToolkit.getMenuShortcutKeyMask(); |
| 182 | menuItem.setAccelerator(KeyStroke.getKeyStroke(what, modifiers)); |
| 183 | return menuItem; |
| 184 | } |
| 185 | |
| 186 | |
| 187 | /** |
no outgoing calls
no test coverage detected