com.jogamp.newt.event.awt

## Class AWTKeyAdapter

- java.lang.Object
- - com.jogamp.newt.event.awt.AWTAdapter
  - - com.jogamp.newt.event.awt.AWTKeyAdapter

- All Implemented Interfaces:
    KeyListener, EventListener

      public class AWTKeyAdapter
      extends AWTAdapter
      implements KeyListener

  AWT: printable: PRESSED (t0), TYPED (t0), RELEASED (t1) non-printable: PRESSED (t0), RELEASED (t1)

- - ### Field Summary

    - ### Fields inherited from class com.jogamp.newt.event.awt.AWTAdapter

      `DEBUG_IMPLEMENTATION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AWTKeyAdapter()`
    `AWTKeyAdapter(KeyListener newtListener, NativeSurfaceHolder nsProxy)`
    `AWTKeyAdapter(KeyListener newtListener, Window newtProxy)`
    `AWTKeyAdapter(Window downstream)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AWTAdapter` | `addTo(Component awtComponent)` Due to the fact that some NEWT `NEWTEventListener` are mapped to more than one `EventListener`, this method is for your convenience to use this Adapter as a listener for all types. E.g.
    `void` | `keyPressed(KeyEvent e)`
    `void` | `keyReleased(KeyEvent e)`
    `void` | `keyTyped(KeyEvent e)`
    `AWTAdapter` | `removeFrom(Component awtComponent)`

    - ### Methods inherited from class com.jogamp.newt.event.awt.AWTAdapter

      `clear, getNativeSurfaceHolder, getNewtEventListener, getNewtWindow, setConsumeAWTEvent, setDownstream`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AWTKeyAdapter

          public AWTKeyAdapter(KeyListener newtListener,
                       NativeSurfaceHolder nsProxy)

    - #### AWTKeyAdapter

          public AWTKeyAdapter(KeyListener newtListener,
                       Window newtProxy)

    - #### AWTKeyAdapter

          public AWTKeyAdapter(Window downstream)

    - #### AWTKeyAdapter

          public AWTKeyAdapter()

  - ### Method Detail

    - #### addTo

          public AWTAdapter addTo(Component awtComponent)

      Description copied from class: `AWTAdapter`
      Due to the fact that some NEWT `NEWTEventListener` are mapped to more than one `EventListener`, this method is for your convenience to use this Adapter as a listener for all types.
      E.g. `MouseListener` is mapped to `MouseListener` and `MouseMotionListener`.
      Specified by:
        `addTo` in class `AWTAdapter`

    - #### removeFrom

          public AWTAdapter removeFrom(Component awtComponent)

      Specified by:
        `removeFrom` in class `AWTAdapter`
      See Also:
        `AWTAdapter.addTo(java.awt.Component)`

    - #### keyPressed

          public void keyPressed(KeyEvent e)

      Specified by:
        `keyPressed` in interface `KeyListener`

    - #### keyReleased

          public void keyReleased(KeyEvent e)

      Specified by:
        `keyReleased` in interface `KeyListener`

    - #### keyTyped

          public void keyTyped(KeyEvent e)

      Specified by:
        `keyTyped` in interface `KeyListener`

Copyright 2010 JogAmp Community.