Class AwtKeyboardWrapper

java.lang.Object
com.ardor3d.input.awt.AwtKeyboardWrapper
All Implemented Interfaces:
KeyboardWrapper, KeyListener, EventListener

public class AwtKeyboardWrapper extends Object implements KeyboardWrapper, KeyListener
Keyboard wrapper class for use with AWT.
  • Field Details

  • Constructor Details

    • AwtKeyboardWrapper

      public AwtKeyboardWrapper(Component component)
  • Method Details

    • init

      public void init()
      Description copied from interface: KeyboardWrapper
      Allows the keyboard wrapper implementation to initialise itself.
      Specified by:
      init in interface KeyboardWrapper
    • getEvents

      public PeekingIterator<KeyEvent> getEvents()
      Description copied from interface: KeyboardWrapper
      Returns a peeking iterator that allows the client to loop through all keyboard events that have not yet been handled.
      Specified by:
      getEvents in interface KeyboardWrapper
      Returns:
      an iterator that allows the client to check which events have still not been handled
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • keyPressed

      public void keyPressed(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener
    • fromKeyEventToKey

      public Key fromKeyEventToKey(KeyEvent e)
      Convert from AWT key event to Ardor3D Key. Override to provide additional or custom behavior.
      Parameters:
      e - the AWT KeyEvent received by the input system.
      Returns:
      an Ardor3D Key, to be forwarded to the Predicate/Trigger system.
    • isConsumeEvents

      public boolean isConsumeEvents()
    • setConsumeEvents

      public void setConsumeEvents(boolean consumeEvents)