MCPcopy Index your code
hub / github.com/benfry/processing4 / newJMenuItem

Method newJMenuItem

app/src/processing/app/ui/Toolkit.java:179–183  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

177 * menu item?
178 */
179 static public JMenuItem newJMenuItem(String title, int what) {
180 JMenuItem menuItem = new JMenuItem(title);
181 menuItem.setAccelerator(KeyStroke.getKeyStroke(what, SHORTCUT_KEY_MASK));
182 return menuItem;
183 }
184
185
186 /**

Callers 7

rebuildToolbarMenuMethod · 0.95
initDefaultFileMenuMethod · 0.95
buildFileMenuMethod · 0.95
buildEditMenuMethod · 0.95
buildSketchMenuMethod · 0.95
buildSketchMenuMethod · 0.95
populateMenuMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected