Package java.awt.event

Examples of java.awt.event.ActionListener.actionPerformed()


                        case UNKNOWN:
                        default:
                            if (c != 0) { // ignore null chars
                                ActionListener action = triggeredActions.get((char) c);
                                if (action != null) {
                                    action.actionPerformed(null);
                                }
                                else {
                                    putChar(c, true);
                                }
                            }
View Full Code Here


                        case UNKNOWN:
                        default:
                            if (c != 0) { // ignore null chars
                                ActionListener action = triggeredActions.get((char) c);
                                if (action != null) {
                                    action.actionPerformed(null);
                                }
                                else {
                                    putChar(c, true);
                                }
                            }
View Full Code Here

                        net.java.games.input.Event ev = new net.java.games.input.Event();
                        while (eq.getNextEvent(ev)) {
                            if (table.getSelectedRow() != -1) {
                                String id = ev.getComponent().getIdentifier().getName();
                                table.setValueAt(id, table.getSelectedRow(), 1);
                                mappingAct.actionPerformed(e);
                            }
                        }
                    }
                });
                jinputTimer[padNum].start();
View Full Code Here

            public boolean dispatchKeyEvent(KeyEvent e) {
                if (e.getID() == KeyEvent.KEY_PRESSED) {
                    if (table.getSelectedRow() != -1) {
                        int id = e.getKeyCode();
                        table.setValueAt(id, table.getSelectedRow(), 1);
                        mappingAct.actionPerformed(new ActionEvent(this, e.getID(), e.getKeyText(e.getKeyCode())));
                        return true;
                    }
                }
                return false;
            }
View Full Code Here

     */
    public void testCreateWithMethodCall() {
        Object invocationObject = new InvocationObject();
        ActionListener listener = EventHandler.create(ActionListener.class,
                invocationObject, "doSomething");
        listener.actionPerformed(new ActionEvent(this, 0, ""));

        assertEquals(getObject(), invocationObject);
        assertEquals("doSomething", getMethodName());

        Object[] params = getParams();
View Full Code Here

    public void testCreateWithSetterCall() {
        Object invocationObject = new InvocationObject();
        ActionEvent ae = new ActionEvent(this, 0, "");
        ActionListener listener = EventHandler.create(ActionListener.class,
                invocationObject, "someObject", "source");
        listener.actionPerformed(ae);

        assertEquals(getObject(), invocationObject);
        assertEquals("setSomeObject", getMethodName());

        Object[] params = getParams();
View Full Code Here

    public void testCreateWithDottedParameterCall() {
        Object invocationObject = new InvocationObject();
        ActionEvent ae = new ActionEvent(this, 0, "");
        ActionListener listener = EventHandler.create(ActionListener.class,
                invocationObject, "someText", "source.text");
        listener.actionPerformed(ae);

        assertEquals(getObject(), invocationObject);
        assertEquals("setSomeText", getMethodName());

        Object[] params = getParams();
View Full Code Here

    //  Hide the popup menu when an ESCAPE key binding is found, otherwise dispose the Window
    ActionListener escapeAction = getEscapeAction(rootPane);

    if(escapeAction != null)
    {
      escapeAction.actionPerformed(null);
    }
    else
    {
      prefMain.loadPreferences();
      Window window = SwingUtilities.windowForComponent(component);
View Full Code Here

                  if (c != 0)
                  { // ignore null chars
                     ActionListener action = triggeredActions.get((char) c);
                     if (action != null)
                     {
                        action.actionPerformed(null);
                     }
                     else
                     {
                        putChar(c, true);
                     }
View Full Code Here

                  if (c != 0)
                  { // ignore null chars
                     ActionListener action = triggeredActions.get((char) c);
                     if (action != null)
                     {
                        action.actionPerformed(null);
                     }
                     else
                     {
                        putChar(c, true);
                     }
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.