Package java.awt.event

Examples of java.awt.event.ActionEvent


    public void storeCurrentEdit() {
        Component comp = Globals.focusListener.getFocused();
        if ((comp == source) || ((comp instanceof FieldEditor) && this.isAncestorOf(comp))) {
            if (comp instanceof FieldEditor)
                ((FieldEditor)comp).clearAutoCompleteSuggestion();
            storeFieldAction.actionPerformed(new ActionEvent(comp, 0, ""));
        }
    }
View Full Code Here


        String newValue = ((e.getNewValue() != null) ? e.getNewValue().toString() : "");
        setField(e.getPropertyName(), newValue);
    }

    public void updateField(final Object source) {
        storeFieldAction.actionPerformed(new ActionEvent(source, 0, ""));
    }
View Full Code Here

        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

     */
    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

    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

    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

    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

    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

        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

    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

TOP

Related Classes of java.awt.event.ActionEvent

Copyright © 2018 www.massapicom. 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.