Package com.jme3.input
Class AWTInput
java.lang.Object
com.jme3.input.AWTInput
- All Implemented Interfaces:
Input
- Direct Known Subclasses:
AWTKeyInput
,AWTMouseInput
-
Field Summary
Modifier and TypeFieldDescriptionprotected Application
TheJMonkey application
that provide the context.protected Component
The input node.protected final AWTContext
The context.protected static final AWTTaskExecutor
protected boolean
Initializes is it.protected RawInputListener
The raw listener. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
Ceases listening to events from the device.long
void
Initializes the native side to listen into events from the device.protected void
boolean
void
setInputListener
(RawInputListener listener) Sets the input listener to receive events from this device.void
unbind()
void
update()
Queries the device for input.protected void
-
Field Details
-
EXECUTOR
-
context
The context. -
listener
The raw listener. -
component
The input node. -
application
TheJMonkey application
that provide the context. -
initialized
protected boolean initializedInitializes is it.
-
-
Constructor Details
-
AWTInput
-
-
Method Details
-
bind
-
unbind
public void unbind() -
initialize
public void initialize()Description copied from interface:Input
Initializes the native side to listen into events from the device.- Specified by:
initialize
in interfaceInput
-
initializeImpl
protected void initializeImpl() -
update
public void update()Description copied from interface:Input
Queries the device for input. All events should be sent to the RawInputListener set with setInputListener. -
updateImpl
protected void updateImpl() -
destroy
public void destroy()Description copied from interface:Input
Ceases listening to events from the device. -
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceInput
- Returns:
- True if the device has been initialized and not destroyed.
- See Also:
-
setInputListener
Description copied from interface:Input
Sets the input listener to receive events from this device. The appropriate events should be dispatched through the callbacks in RawInputListener.- Specified by:
setInputListener
in interfaceInput
- Parameters:
listener
- the desired listener
-
getInputTimeNanos
public long getInputTimeNanos()- Specified by:
getInputTimeNanos
in interfaceInput
- Returns:
- The current absolute time as nanoseconds. This time is expected to be relative to the time given in InputEvents time property.
-