com.jogamp.newt.event
Class KeyAdapter

java.lang.Object
  extended by com.jogamp.newt.event.KeyAdapter
All Implemented Interfaces:
KeyListener, NEWTEventListener, EventListener

public abstract class KeyAdapter
extends Object
implements KeyListener


Constructor Summary
KeyAdapter()
           
 
Method Summary
 void keyPressed(KeyEvent e)
          A key has been pressed, excluding auto-repeat modifier keys.
 void keyReleased(KeyEvent e)
          A key has been released, excluding auto-repeat modifier keys.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyAdapter

public KeyAdapter()
Method Detail

keyPressed

public void keyPressed(KeyEvent e)
Description copied from interface: KeyListener
A key has been pressed, excluding auto-repeat modifier keys. See KeyEvent.

Specified by:
keyPressed in interface KeyListener

keyReleased

public void keyReleased(KeyEvent e)
Description copied from interface: KeyListener
A key has been released, excluding auto-repeat modifier keys. See KeyEvent.

To simulated the removed keyTyped(KeyEvent e) semantics, simply apply the following constraints upfront and bail out if not matched, i.e.:

        if( !e.isPrintableKey() || e.isAutoRepeat() ) {
            return;
        }            
 

Specified by:
keyReleased in interface KeyListener


Copyright 2010 JogAmp Community.