Refine search
for(ActionListener a: buttonExample.getActionListeners()) { a.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, null) { //Nothing need go here, the actionPerformed method (with the //above arguments) will trigger the respective listener }); }
public void fireActionPerformed() { if (listner != null) { listner.actionPerformed(new ActionEvent(this, 0, "")); } } }
/** * Send a ChangeEvent, whose source is this Slider, to * each listener. This method method is called each time * a ChangeEvent is received from the model. * * @param menuKey The menu item key that was selected. * @see #addActionListener * @see javax.swing.event.EventListenerList */ protected void fireActionEvent(String menuKey) { ActionEvent actionEvent = new ActionEvent(this, 0, menuKey); Object[] listeners = listenerList.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ActionListener.class) { ((ActionListener) listeners[i + 1]).actionPerformed(actionEvent); } } }
@Override public void actionPerformed( ActionEvent e ) { nd.setValue(option); if (buttonListener != null) { // #34485: some listeners expect that the action source is the option, not the button ActionEvent e2 = new ActionEvent( option, e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers() ); buttonListener.actionPerformed(e2); } if ((closingOptions == null) || Arrays.asList(closingOptions).contains(option)) { haveFinalValue = true; setVisible(false); } } }
actionCommand = model.getActionCommand(); ActionEvent ae = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, actionCommand); for (int i = listeners.length-2; i>=0; i-=2) { if (listeners[i]== ActionListener.class) { ((ActionListener)listeners[i+1]).actionPerformed(ae);
private void notifyCloseListeners() { for(ActionListener listener : closeListeners) { listener.actionPerformed(new ActionEvent(this, 0, "")); } } }
private synchronized void fireActionPerformed() { if (actionListeners == null) return; ActionEvent a = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, ""); for (ActionListener l : actionListeners) l.actionPerformed(a); }
public void actionPerformed(ActionEvent e) { // mutate it into an event on ourslves // actually it doesn't really matter at the moment, // any event will cause the parent panels to regen the XML if (_listener != null) { e = new ActionEvent(this, 0, null); _listener.actionPerformed(e); } }
public void actionPerformed(ActionEvent e) { // mutate it into an event on ourslves // actually it doesn't really matter at the moment, // any event will cause the parent panels to regen the XML if (_listener != null) { e = new ActionEvent(this, 0, null); _listener.actionPerformed(e); } }
private static void notifyEnableDisableAWTEventListeners(boolean enable) { String command = EVENT_FILTER_ENABLED_ACTION_CMD; if (!enable) { command = EVENT_FILTER_DISABLED_ACTION_CMD; } ActionEvent event = new ActionEvent(eventFilter, 0, command); for (ActionListener l : enableDisableAWTEventListeners) { l.actionPerformed(event); } }
public void fireActionPerformed () { if (listner != null) { listner.actionPerformed (new ActionEvent (this, 0, "")); } } }
@Override public void mouseClicked(MouseEvent event) { ActionListener action = getAction(event); if (action != null) action.actionPerformed(new ActionEvent(DiffView.this, 0, "action")); } });
@Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { if (doubleClickListener != null) { doubleClickListener.actionPerformed(new ActionEvent(e, 0, "dblclick")); } } } });
public void stateChanged(ChangeEvent e) { if(actionListeners.isEmpty()){ return; } final ActionEvent actionEvent = new ActionEvent(e.getSource(), 0, null); for(ActionListener l : actionListeners){ l.actionPerformed(actionEvent); } } });
void fireAction(String command) { ActionEvent e = new ActionEvent(this, 0, command); for (int i = actionListeners.size() - 1; i >= 0; i--) actionListeners.get(i).actionPerformed(e); }
/** * Informs all {@link ActionListener}s that this button was clicked. */ protected void fire(){ ActionEvent event = new ActionEvent( this, ActionEvent.ACTION_PERFORMED, null ); for( ActionListener listener : listeners.toArray( new ActionListener[ listeners.size() ] )){ listener.actionPerformed( event ); } } }
/** * Removes the navigational data from another NavigatorView. */ public void remove(NavigatorView view) { debug("removing "+view); // redo the search if necessary if (searchparams.getText() != null) { searchAction.actionPerformed(new ActionEvent(searchparams, ActionEvent.ACTION_PERFORMED, "")); } }
@Override public void actionPerformed(final ActionEvent e) { if (!source.isEnabled()) return; final ActionEvent event = new ActionEvent(source, 0, "Accelerator"); listener.actionPerformed(event); } });
private void genEvents() { revalidate(); final ActionEvent event = new ActionEvent(this, 0, ""); for (final ActionListener al : listeners) { al.actionPerformed(event); } }
public void actionPerformed(ActionEvent _evt) { listener_.actionPerformed(new ActionEvent (_evt.getSource(),_evt.getID(),action_)); } }