Class SwtKeyboardWrapper

java.lang.Object
com.ardor3d.input.swt.SwtKeyboardWrapper
All Implemented Interfaces:
KeyboardWrapper, EventListener, org.eclipse.swt.events.KeyListener, org.eclipse.swt.internal.SWTEventListener

public class SwtKeyboardWrapper extends Object implements KeyboardWrapper, org.eclipse.swt.events.KeyListener
Keyboard wrapper for SWT input.
  • Constructor Details

    • SwtKeyboardWrapper

      public SwtKeyboardWrapper(org.eclipse.swt.widgets.Control control)
  • 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
    • keyPressed

      public void keyPressed(org.eclipse.swt.events.KeyEvent event)
      Specified by:
      keyPressed in interface org.eclipse.swt.events.KeyListener
    • keyReleased

      public void keyReleased(org.eclipse.swt.events.KeyEvent event)
      Specified by:
      keyReleased in interface org.eclipse.swt.events.KeyListener
    • fromKeyEventToKey

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