Examples of ActionEvent


Examples of java.awt.event.ActionEvent

        comboBox.setSelectedIndex(0);

        // Fire event that we changed the editor
        if (action != null)
            action.actionPerformed(new ActionEvent(editor, 0, ""));

        // Transfer focus to the editor.
        editor.requestFocus();
    }
View Full Code Here

Examples of java.awt.event.ActionEvent

     */
    protected void addFieldUncritically(String s) {
        listModel.addElement(s);
        changesMade = true;
        for (Iterator<ActionListener> i=additionListeners.iterator(); i.hasNext();) {
            i.next().actionPerformed(new ActionEvent(this, 0, s));
        }
       
    }
View Full Code Here

Examples of java.awt.event.ActionEvent

    FileMenuListener(FileSet set) {
      fileSet = set;
    }

    public void actionPerformed(ActionEvent argActionEvent) {
      final ActionEvent actionEvent = argActionEvent;
      Runnable update = new Runnable() {
        public void run() {
          try {
            fileMru.setLast(fileSet);
            fileMru.notifyObservers();
View Full Code Here

Examples of java.awt.event.ActionEvent

    class Worker extends Thread {
        private ActionEvent myEvent;

        Worker(MouseEvent e) {
            myEvent = new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
                    getActionCommand(), EventQueue.getMostRecentEventTime(), e
                            .getModifiers());
            ;
        }
View Full Code Here

Examples of java.awt.event.ActionEvent

    public void removeActionListener(ActionListener listener) {
        listeners.remove(listener);
    }

    public void fireActionEvent() {
        ActionEvent event = new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
                "Pattern");
        ArrayList list = (ArrayList) listeners.clone();
        ActionListener listener;
        for (int i = 0; i < list.size(); i++) {
            listener = (ActionListener) list.get(i);
View Full Code Here

Examples of java.awt.event.ActionEvent

    boolean s[] = sel[r];
    for(int i = 0 ; i < s.length; i++) {
      s[i] = selected;
    }
    if(listener != null) {
      listener.actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "selection")); //$NON-NLS-1$
    }
  }
View Full Code Here

Examples of java.awt.event.ActionEvent

        return false;
       
    }

    boolean actionEvent(int modifiers) {
        ActionEvent evt = null;
        for (int i = listeners == null ? -1 : listeners.size() - 1; i >= 0; i--) {
            if (evt == null) {
                evt = new ActionEvent(this, 1001, actionCommand, modifiers);
            }
            ((ActionListener) listeners.elementAt(i)).actionPerformed(evt);
        }
        return false;
    }
View Full Code Here

Examples of java.awt.event.ActionEvent

    public void actionPerformed(ActionEvent evt) {
        if (listeners != null) {
            Object[] listenerList = listeners.getListenerList();
            // Recreate the ActionEvent and stuff the value of the
            // ACTION_COMMAND_KEY
            ActionEvent e = new ActionEvent(evt.getSource(), evt.getID(),
                    (String) getValue(Action.ACTION_COMMAND_KEY));
            for (int i = 0; i <= (listenerList.length - 2); i += 2) {
                ((ActionListener) listenerList[i + 1]).actionPerformed(e);
            }
        }
View Full Code Here

Examples of java.awt.event.ActionEvent

            listeners.removeElement(l);
        }
    }

    public boolean action() {
        ActionEvent evt = null;
        for (int i = listeners == null ? -1 : listeners.size() - 1; i >= 0; i--) {
            if (evt == null) {
                evt = new ActionEvent(this, 1001, getName());
            }
            ((ActionListener) listeners.elementAt(i)).actionPerformed(evt);
        }
        return false;
    }
View Full Code Here

Examples of java.awt.event.ActionEvent

   */
  public void setSelectedTab(int idx) {
    sel = idx;
    if (sel != -1) {
      int s = listenerList.size();
      ActionEvent aevt = null;
      for (int i = s - 1; i >= 0; i--) {
        if (aevt == null) {
          aevt = new ActionEvent(TabbedPanel.this, ActionEvent.ACTION_PERFORMED,
                                 ""); //$NON-NLS-1$
        }
        ( (ActionListener) listenerList.elementAt(i)).actionPerformed(aevt);
      }
      Component c = getComponent(sel);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.