|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.input.android.AndroidInput
public class AndroidInput
AndroidInput
is one of the main components that connect jme with android. Is derived from GLSurfaceView and handles all Inputs
Field Summary | |
---|---|
boolean |
dontSendHistory
|
boolean |
keyboardEventsEnabled
|
boolean |
mouseEventsEnabled
|
boolean |
mouseEventsInvertX
|
boolean |
mouseEventsInvertY
|
Fields inherited from interface com.jme3.input.TouchInput |
---|
ALL, KEYCODE_BACK, KEYCODE_HOME, KEYCODE_MENU, KEYCODE_SEARCH, KEYCODE_VOLUME_DOWN, KEYCODE_VOLUME_UP |
Constructor Summary | |
---|---|
AndroidInput(android.view.View view)
|
Method Summary | |
---|---|
void |
destroy()
Ceases listening to events from the device. |
long |
getInputTimeNanos()
|
boolean |
getSimulateMouse()
Get if mouse events are generated |
void |
initialize()
Initializes the native side to listen into events from the device. |
boolean |
isInitialized()
|
boolean |
isMouseEventsEnabled()
Deprecated. Use getSimulateMouse() ; |
boolean |
isMouseEventsInvertX()
|
boolean |
isMouseEventsInvertY()
|
boolean |
isSimulateMouse()
|
void |
loadSettings(AppSettings settings)
|
boolean |
onDoubleTap(android.view.MotionEvent event)
|
boolean |
onDoubleTapEvent(android.view.MotionEvent event)
|
boolean |
onDown(android.view.MotionEvent event)
|
boolean |
onFling(android.view.MotionEvent event,
android.view.MotionEvent event2,
float vx,
float vy)
|
boolean |
onKey(android.view.View view,
int keyCode,
android.view.KeyEvent event)
onKey gets called from android thread on key events |
void |
onLongPress(android.view.MotionEvent event)
|
boolean |
onScale(android.view.ScaleGestureDetector scaleGestureDetector)
|
boolean |
onScaleBegin(android.view.ScaleGestureDetector scaleGestureDetector)
|
void |
onScaleEnd(android.view.ScaleGestureDetector scaleGestureDetector)
|
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY)
|
void |
onShowPress(android.view.MotionEvent event)
|
boolean |
onSingleTapConfirmed(android.view.MotionEvent event)
|
boolean |
onSingleTapUp(android.view.MotionEvent event)
|
boolean |
onTouch(android.view.View view,
android.view.MotionEvent event)
onTouch gets called from android thread on touchpad events |
void |
setInputListener(RawInputListener listener)
Sets the input listener to receive events from this device. |
void |
setMouseEventsEnabled(boolean mouseEventsEnabled)
Deprecated. |
void |
setMouseEventsInvertX(boolean mouseEventsInvertX)
|
void |
setMouseEventsInvertY(boolean mouseEventsInvertY)
|
void |
setOmitHistoricEvents(boolean dontSendHistory)
Set if historic android events should be transmitted, can be used to get better performance and less mem |
void |
setSimulateKeyboard(boolean simulate)
Set if keyboard events should be generated |
void |
setSimulateMouse(boolean simulate)
Set if mouse events should be generated |
void |
setView(android.view.View view)
|
void |
update()
Queries the device for input. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public boolean mouseEventsEnabled
public boolean mouseEventsInvertX
public boolean mouseEventsInvertY
public boolean keyboardEventsEnabled
public boolean dontSendHistory
Constructor Detail |
---|
public AndroidInput(android.view.View view)
Method Detail |
---|
public void setView(android.view.View view)
public boolean onTouch(android.view.View view, android.view.MotionEvent event)
onTouch
in interface android.view.View.OnTouchListener
public boolean onKey(android.view.View view, int keyCode, android.view.KeyEvent event)
onKey
in interface android.view.View.OnKeyListener
public void loadSettings(AppSettings settings)
public void initialize()
Input
initialize
in interface Input
public void destroy()
Input
destroy
in interface Input
public boolean isInitialized()
isInitialized
in interface Input
Input.initialize()
,
Input.destroy()
public void setInputListener(RawInputListener listener)
Input
setInputListener
in interface Input
public long getInputTimeNanos()
getInputTimeNanos
in interface Input
public void update()
Input
update
in interface Input
Input.setInputListener(com.jme3.input.RawInputListener)
public boolean onDown(android.view.MotionEvent event)
onDown
in interface android.view.GestureDetector.OnGestureListener
public void onLongPress(android.view.MotionEvent event)
onLongPress
in interface android.view.GestureDetector.OnGestureListener
public boolean onFling(android.view.MotionEvent event, android.view.MotionEvent event2, float vx, float vy)
onFling
in interface android.view.GestureDetector.OnGestureListener
public boolean onSingleTapConfirmed(android.view.MotionEvent event)
onSingleTapConfirmed
in interface android.view.GestureDetector.OnDoubleTapListener
public boolean onDoubleTap(android.view.MotionEvent event)
onDoubleTap
in interface android.view.GestureDetector.OnDoubleTapListener
public boolean onDoubleTapEvent(android.view.MotionEvent event)
onDoubleTapEvent
in interface android.view.GestureDetector.OnDoubleTapListener
public boolean onScaleBegin(android.view.ScaleGestureDetector scaleGestureDetector)
onScaleBegin
in interface android.view.ScaleGestureDetector.OnScaleGestureListener
public boolean onScale(android.view.ScaleGestureDetector scaleGestureDetector)
onScale
in interface android.view.ScaleGestureDetector.OnScaleGestureListener
public void onScaleEnd(android.view.ScaleGestureDetector scaleGestureDetector)
onScaleEnd
in interface android.view.ScaleGestureDetector.OnScaleGestureListener
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)
onScroll
in interface android.view.GestureDetector.OnGestureListener
public void onShowPress(android.view.MotionEvent event)
onShowPress
in interface android.view.GestureDetector.OnGestureListener
public boolean onSingleTapUp(android.view.MotionEvent event)
onSingleTapUp
in interface android.view.GestureDetector.OnGestureListener
public void setSimulateKeyboard(boolean simulate)
TouchInput
setSimulateKeyboard
in interface TouchInput
simulate
- if keyboard events should be generatedpublic void setOmitHistoricEvents(boolean dontSendHistory)
TouchInput
setOmitHistoricEvents
in interface TouchInput
dontSendHistory
- turn of historic events if true, false else and default@Deprecated public boolean isMouseEventsEnabled()
getSimulateMouse()
;
@Deprecated public void setMouseEventsEnabled(boolean mouseEventsEnabled)
public boolean isMouseEventsInvertY()
public void setMouseEventsInvertY(boolean mouseEventsInvertY)
public boolean isMouseEventsInvertX()
public void setMouseEventsInvertX(boolean mouseEventsInvertX)
public void setSimulateMouse(boolean simulate)
TouchInput
setSimulateMouse
in interface TouchInput
simulate
- if mouse events should be generatedpublic boolean getSimulateMouse()
TouchInput
getSimulateMouse
in interface TouchInput
public boolean isSimulateMouse()
isSimulateMouse
in interface TouchInput
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |