MCPcopy Index your code
hub / github.com/processing/processing / newJMenuItemExt

Method newJMenuItemExt

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

Create a menu item and set its KeyStroke by name (so it can be stored in the language settings or the preferences. Syntax is here: https://docs.oracle.com/javase/8/docs/api/javax/swing/KeyStroke.html#getKeyStroke-java.lang.String- @param sequence the name, as outlined by the KeyStroke API @param fal

(String base)

Source from the content-addressed store, hash-verified

161 * @param fallback what to use if getKeyStroke() comes back null
162 */
163 static public JMenuItem newJMenuItemExt(String base) {
164 JMenuItem menuItem = new JMenuItem(Language.text(base));
165 KeyStroke ks = getKeyStrokeExt(base); // will print error if necessary
166 if (ks != null) {
167 menuItem.setAccelerator(ks);
168 }
169 return menuItem;
170 }
171
172
173 /**

Callers 3

buildEditMenuMethod · 0.95
rebuildMenuMethod · 0.95
buildDebugMenuMethod · 0.95

Calls 2

textMethod · 0.95
getKeyStrokeExtMethod · 0.95

Tested by

no test coverage detected