Package com.jme3.input.android
Class AndroidInputHandler
- java.lang.Object
-
- com.jme3.input.android.AndroidInputHandler
-
- All Implemented Interfaces:
android.view.View.OnKeyListener,android.view.View.OnTouchListener
- Direct Known Subclasses:
AndroidInputHandler14
public class AndroidInputHandler extends java.lang.Object implements android.view.View.OnTouchListener, android.view.View.OnKeyListenerAndroidInputis the main class that connects the Android system inputs to jME. It receives the inputs from the Android View and passes them to the appropriate classes based on the source of the input.
This class is to be extended when new functionality is released in Android.- Author:
- iwgeric
-
-
Field Summary
Fields Modifier and Type Field Description protected AndroidJoyInputjoyInputprotected AndroidTouchInputtouchInputprotected android.opengl.GLSurfaceViewview
-
Constructor Summary
Constructors Constructor Description AndroidInputHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddListeners(android.opengl.GLSurfaceView view)com.jme3.input.JoyInputgetJoyInput()com.jme3.input.TouchInputgetTouchInput()android.view.ViewgetView()voidloadSettings(com.jme3.system.AppSettings settings)booleanonKey(android.view.View view, int keyCode, android.view.KeyEvent event)booleanonTouch(android.view.View view, android.view.MotionEvent event)protected voidremoveListeners(android.opengl.GLSurfaceView view)voidsetView(android.view.View view)
-
-
-
Field Detail
-
view
protected android.opengl.GLSurfaceView view
-
touchInput
protected AndroidTouchInput touchInput
-
joyInput
protected AndroidJoyInput joyInput
-
-
Method Detail
-
setView
public void setView(android.view.View view)
-
getView
public android.view.View getView()
-
removeListeners
protected void removeListeners(android.opengl.GLSurfaceView view)
-
addListeners
protected void addListeners(android.opengl.GLSurfaceView view)
-
loadSettings
public void loadSettings(com.jme3.system.AppSettings settings)
-
getTouchInput
public com.jme3.input.TouchInput getTouchInput()
-
getJoyInput
public com.jme3.input.JoyInput getJoyInput()
-
onTouch
public boolean onTouch(android.view.View view, android.view.MotionEvent event)- Specified by:
onTouchin interfaceandroid.view.View.OnTouchListener
-
onKey
public boolean onKey(android.view.View view, int keyCode, android.view.KeyEvent event)- Specified by:
onKeyin interfaceandroid.view.View.OnKeyListener
-
-