MCPcopy
hub / github.com/arduino/Arduino / newJMenuItem

Method newJMenuItem

app/src/processing/app/Editor.java:1339–1343  ·  view source on GitHub ↗

A software engineer, somewhere, needs to have his abstraction taken away. In some countries they jail or beat people for writing the sort of API that would require a five line helper function just to set the command key for a menu item.

(String title, int what)

Source from the content-addressed store, hash-verified

1337 * just to set the command key for a menu item.
1338 */
1339 static public JMenuItem newJMenuItem(String title, int what) {
1340 JMenuItem menuItem = new JMenuItem(title);
1341 menuItem.setAccelerator(KeyStroke.getKeyStroke(what, SHORTCUT_KEY_MASK));
1342 return menuItem;
1343 }
1344
1345
1346 /**

Callers 4

buildFileMenuMethod · 0.95
buildSketchMenuMethod · 0.95
buildEditMenuMethod · 0.95
rebuildToolbarMenuMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected