Changeset 8702


Ignore:
Timestamp:
03/04/05 17:34:48 (16 years ago)
Author:
piso
Message:

handleJEvent()

Location:
trunk/j/src/org/armedbear/j
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/Dispatcher.java

    r7666 r8702  
    22 * Dispatcher.java
    33 *
    4  * Copyright (C) 1998-2004 Peter Graves
    5  * $Id: Dispatcher.java,v 1.13 2004-09-13 13:48:31 piso Exp $
     4 * Copyright (C) 1998-2005 Peter Graves
     5 * $Id: Dispatcher.java,v 1.14 2005-03-04 17:34:21 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    244244            Log.debug("modifiers = 0x" + Integer.toString(modifiers, 16));
    245245
    246         boolean handled = editor.handleKeyEvent(c, keycode, modifiers);
     246        boolean handled = editor.handleJEvent(new JEvent(JEvent.KEY_PRESSED,
     247                                                         keycode, c, modifiers));
    247248
    248249        if (handled) {
     
    278279        char c = e.getKeyChar();
    279280
    280         boolean handled = editor.handleKeyEvent(c, 0, 0);
     281        boolean handled = editor.handleJEvent(new JEvent(JEvent.KEY_TYPED,
     282                                                         0, c, 0));
    281283
    282284        Buffer buffer = editor.getBuffer();
     
    538540        if (keycode == 0)
    539541            return false;
    540         return editor.handleKeyEvent('\0', keycode, modifiers);
     542        return editor.handleJEvent(new JEvent(JEvent.MOUSE_PRESSED,
     543                                              keycode, (char) 0, modifiers));
    541544    }
    542545
  • trunk/j/src/org/armedbear/j/Editor.java

    r8693 r8702  
    33 *
    44 * Copyright (C) 1998-2005 Peter Graves
    5  * $Id: Editor.java,v 1.140 2005-03-03 19:28:17 piso Exp $
     5 * $Id: Editor.java,v 1.141 2005-03-04 17:33:45 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    24372437    private String prefixKeyStatusText;
    24382438
    2439     public boolean handleKeyEvent(char keyChar, int keyCode, int modifiers)
    2440     {
     2439    public boolean handleJEvent(JEvent event)
     2440    {
     2441        char keyChar = event.getKeyChar();
     2442        int keyCode = event.getKeyCode();
     2443        int modifiers = event.getModifiers();
     2444
    24412445        if (insertingKeyText) {
    24422446            insertKeyTextInternal(keyChar, keyCode, modifiers);
  • trunk/j/src/org/armedbear/j/IncrementalFindTextFieldHandler.java

    r8397 r8702  
    33 *
    44 * Copyright (C) 1998-2005 Peter Graves
    5  * $Id: IncrementalFindTextFieldHandler.java,v 1.6 2005-01-24 16:18:29 piso Exp $
     5 * $Id: IncrementalFindTextFieldHandler.java,v 1.7 2005-03-04 17:34:48 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    236236            }
    237237        } else {
    238             editor.handleKeyEvent(e.getKeyChar(), keyCode, e.getModifiers());
     238            editor.handleJEvent(new JEvent(e));
    239239            // We may need to do a horizontal reframe (home, end).
    240240            editor.updateDisplay();
Note: See TracChangeset for help on using the changeset viewer.