@Override public void actionPerformed(ActionEvent e) { e.setSource(tree); selectPrevious.actionPerformed(e); } };
protected void fireActionPerformed(ActionEvent e) { e.setSource(this); actionListeners.stream().forEach((l) -> { l.actionPerformed(e); }); }
public void actionPerformed(ActionEvent e) { e.setSource(this); searcher.actionPerformed(e); }
@Override public void actionPerformed(ActionEvent e) { ActionListener[] listeners = this.getListeners(ActionListener.class); // set the source to this e.setSource(this); // forward the event to the listeners on this class for (ActionListener listener : listeners) { listener.actionPerformed(e); } }
public void actionPerformed(ActionEvent e) { if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) { //Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects //that action events performed on trees actually come from //trees e.setSource(getTree()); treeAction.actionPerformed(e); } else { tableAction.actionPerformed(e); } } }
public void actionPerformed(ActionEvent e) { if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) { //Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects //that action events performed on trees actually come from //trees e.setSource(getTree()); treeAction.actionPerformed(e); } }
public void actionPerformed(ActionEvent e) { if (TreeTable.this.getSelectedColumn() == getTreeColumnIndex()) { //Issue 40075, on JDK 1.5, BasicTreeUI remarkably expects //that action events performed on trees actually come from //trees e.setSource(getTree()); treeAction.actionPerformed(e); } }
/** * This method implements this <tt>Action's</tt> behavior. * <p> * If there's a proxy Action then call its actionPerformed * method. Otherwise, call the @Action method with parameter * values provided by {@code getActionArgument()}. If anything goes wrong * call {@code actionFailed()}. * * @param actionEvent @{inheritDoc} * @see #setProxy * @see #getActionArgument * @see Task */ @Override public void actionPerformed(ActionEvent actionEvent) { javax.swing.Action proxy = getProxy(); if (proxy != null) { actionEvent.setSource(getProxySource()); proxy.actionPerformed(actionEvent); } else if (actionMethod != null) { noProxyActionPerformed(actionEvent); } }
/** * This method implements this <tt>Action's</tt> behavior. * <p> * If there's a proxy Action then call its actionPerformed * method. Otherwise, call the @Action method with parameter * values provided by {@code getActionArgument()}. If anything goes wrong * call {@code actionFailed()}. * * @param actionEvent @{inheritDoc} * @see #setProxy * @see #getActionArgument * @see Task */ public void actionPerformed(ActionEvent actionEvent) { javax.swing.Action proxy = getProxy(); if (proxy != null) { actionEvent.setSource(getProxySource()); proxy.actionPerformed(actionEvent); } else if (actionMethod != null) { noProxyActionPerformed(actionEvent); } }
@Override public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source instanceof JMenuItem) { JMenuItem item = (JMenuItem)source; Icon icon = item.getIcon(); // If it has an icon, it must be a swatch. if (icon!=null) { ColorIcon colorIcon = (ColorIcon)icon; Color color = colorIcon.getColor(); RColorSwatchesButton.this.setColor(color); } // Otherwise, it is the "More colors..." menu item. else { e.setSource(RColorSwatchesButton.this); super.actionPerformed(e); } } }