public void actionPerformed(ActionEvent e) { Action wrapped = getWrapped(); if (wrapped != null) { wrapped.actionPerformed (e); } else { Toolkit.getDefaultToolkit().beep(); } }
getActionMap().put("invokeCustomEditor", new CustomEditorProxyAction()); //NOI18N
/** The constructor all the other constructors call */ private PropertyPanel(Node.Property p, int preferences, PropertyModel mdl) { if (p == null) { prop = ModelProperty.toProperty(mdl); } else { prop = p; } this.preferences = preferences; initializing = true; setModel(mdl); initializing = false; setOpaque(true); //for debugging, allow CTRL-. to dump the state to stderr getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "dump"); getActionMap().put("dump", new AbstractAction() { //NOI18N public void actionPerformed(ActionEvent ae) { System.err.println(""); //NOI18N System.err.println(PropertyPanel.this); System.err.println(""); //NOI18N } }); //#44226 - Unpretty, but this allows the TreeTableView to invoke a custom editor dialog when //necessary - with the TTV rewrite, all cell editor infrastructure will be moved to //org.netbeans.modules.openide.explorer, and they will simply share editor classes. Since that //involves an API change (some package private methods of PropertyEnv need to be accessible to //the editor classes), this will have to wait for after 4.0 - Tim getActionMap().put("invokeCustomEditor", new CustomEditorProxyAction()); //NOI18N }
/** The constructor all the other constructors call */ private PropertyPanel(Node.Property p, int preferences, PropertyModel mdl) { if (p == null) { prop = ModelProperty.toProperty(mdl); } else { prop = p; } this.preferences = preferences; initializing = true; setModel(mdl); initializing = false; setOpaque(true); //for debugging, allow CTRL-. to dump the state to stderr getInputMap(WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()), "dump"); getActionMap().put("dump", new AbstractAction() { //NOI18N public void actionPerformed(ActionEvent ae) { System.err.println(""); //NOI18N System.err.println(PropertyPanel.this); System.err.println(""); //NOI18N } }); //#44226 - Unpretty, but this allows the TreeTableView to invoke a custom editor dialog when //necessary - with the TTV rewrite, all cell editor infrastructure will be moved to //org.netbeans.modules.openide.explorer, and they will simply share editor classes. Since that //involves an API change (some package private methods of PropertyEnv need to be accessible to //the editor classes), this will have to wait for after 4.0 - Tim getActionMap().put("invokeCustomEditor", new CustomEditorProxyAction()); //NOI18N }
public boolean isEnabled() { Action wrapped = getWrapped(); if (wrapped != null) { return wrapped.isEnabled(); } else { return getProperty() != null; } } }
public boolean isEnabled() { Action wrapped = getWrapped(); if (wrapped != null) { return wrapped.isEnabled(); } else { return getProperty() != null; } } }
public void actionPerformed(ActionEvent e) { Action wrapped = getWrapped(); if (wrapped != null) { wrapped.actionPerformed (e); } else { Toolkit.getDefaultToolkit().beep(); } }
public boolean isEnabled() { Action wrapped = getWrapped(); if (wrapped != null) { return wrapped.isEnabled(); } else { return getProperty() != null; } } }
public void actionPerformed(ActionEvent e) { Action wrapped = getWrapped(); if (wrapped != null) { wrapped.actionPerformed(e); } else { Toolkit.getDefaultToolkit().beep(); } }