com.jme3.niftygui
Class InputSystemJme

java.lang.Object
  extended by com.jme3.niftygui.InputSystemJme
All Implemented Interfaces:
RawInputListener, de.lessvoid.nifty.spi.input.InputSystem

public class InputSystemJme
extends java.lang.Object
implements de.lessvoid.nifty.spi.input.InputSystem, RawInputListener


Constructor Summary
InputSystemJme(InputManager inputManager)
           
 
Method Summary
 void beginInput()
          Called before a batch of input will be sent to this RawInputListener.
 void endInput()
          Called after a batch of input was sent to this RawInputListener.
 void forwardEvents(de.lessvoid.nifty.NiftyInputConsumer nic)
           
 void onJoyAxisEvent(JoyAxisEvent evt)
          Invoked on joystick axis events.
 void onJoyButtonEvent(JoyButtonEvent evt)
          Invoked on joystick button presses.
 void onKeyEvent(KeyInputEvent evt)
          Invoked on keyboard key press or release events.
 void onMouseButtonEvent(MouseButtonEvent evt)
          Invoked on mouse button events.
 void onMouseMotionEvent(MouseMotionEvent evt)
          Invoked on mouse movement/motion events.
 void onTouchEvent(TouchEvent evt)
          Invoked on touchscreen touch events.
 void setHeight(int height)
           
 void setMousePosition(int x, int y)
           
 void setNifty(de.lessvoid.nifty.Nifty nifty)
           
 void setResourceLoader(de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader niftyResourceLoader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputSystemJme

public InputSystemJme(InputManager inputManager)
Method Detail

setResourceLoader

public void setResourceLoader(de.lessvoid.nifty.tools.resourceloader.NiftyResourceLoader niftyResourceLoader)
Specified by:
setResourceLoader in interface de.lessvoid.nifty.spi.input.InputSystem

setNifty

public void setNifty(de.lessvoid.nifty.Nifty nifty)

setHeight

public void setHeight(int height)
Parameters:
height - The height of the viewport. Used to convert buttom-left origin to upper-left origin.

setMousePosition

public void setMousePosition(int x,
                             int y)
Specified by:
setMousePosition in interface de.lessvoid.nifty.spi.input.InputSystem

beginInput

public void beginInput()
Description copied from interface: RawInputListener
Called before a batch of input will be sent to this RawInputListener.

Specified by:
beginInput in interface RawInputListener

endInput

public void endInput()
Description copied from interface: RawInputListener
Called after a batch of input was sent to this RawInputListener. The listener should set the consumed flag on any events that have been consumed either at this call or previous calls.

Specified by:
endInput in interface RawInputListener

onMouseMotionEvent

public void onMouseMotionEvent(MouseMotionEvent evt)
Description copied from interface: RawInputListener
Invoked on mouse movement/motion events.

Specified by:
onMouseMotionEvent in interface RawInputListener

onMouseButtonEvent

public void onMouseButtonEvent(MouseButtonEvent evt)
Description copied from interface: RawInputListener
Invoked on mouse button events.

Specified by:
onMouseButtonEvent in interface RawInputListener

onJoyAxisEvent

public void onJoyAxisEvent(JoyAxisEvent evt)
Description copied from interface: RawInputListener
Invoked on joystick axis events.

Specified by:
onJoyAxisEvent in interface RawInputListener

onJoyButtonEvent

public void onJoyButtonEvent(JoyButtonEvent evt)
Description copied from interface: RawInputListener
Invoked on joystick button presses.

Specified by:
onJoyButtonEvent in interface RawInputListener

onKeyEvent

public void onKeyEvent(KeyInputEvent evt)
Description copied from interface: RawInputListener
Invoked on keyboard key press or release events.

Specified by:
onKeyEvent in interface RawInputListener

onTouchEvent

public void onTouchEvent(TouchEvent evt)
Description copied from interface: RawInputListener
Invoked on touchscreen touch events.

Specified by:
onTouchEvent in interface RawInputListener

forwardEvents

public void forwardEvents(de.lessvoid.nifty.NiftyInputConsumer nic)
Specified by:
forwardEvents in interface de.lessvoid.nifty.spi.input.InputSystem