Package io.tlf.jme.jfx.injfx.input
Class JfxInput
- java.lang.Object
-
- io.tlf.jme.jfx.injfx.input.JfxInput
-
- All Implemented Interfaces:
com.jme3.input.Input
- Direct Known Subclasses:
JfxKeyInput,JfxMouseInput
public class JfxInput extends java.lang.Object implements com.jme3.input.InputThe base implementation of theInputfor using in the ImageView.
-
-
Field Summary
Fields Modifier and Type Field Description protected JmeOffscreenSurfaceContextcontextThe context.protected static ApplicationThreadExecutorEXECUTORprotected booleaninitializedThe flag of initializing this.protected com.jme3.input.RawInputListenerlistenerThe raw listener.protected javafx.scene.NodenodeThe input node.protected javafx.scene.ScenesceneThe scene.
-
Constructor Summary
Constructors Constructor Description JfxInput(JmeOffscreenSurfaceContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(javafx.scene.Node node)Bind this input to the node.voiddestroy()longgetInputTimeNanos()protected com.jme3.input.RawInputListenergetListener()Gets the raw listener.protected javafx.scene.NodegetNode()Gets the bound node.protected booleanhasNode()Checks of existing the node.voidinitialize()protected voidinitializeImpl()Initialize.booleanisInitialized()voidsetInputListener(com.jme3.input.RawInputListener listener)voidunbind()Unbind.voidupdate()protected voidupdateImpl()Update.
-
-
-
Field Detail
-
EXECUTOR
protected static final ApplicationThreadExecutor EXECUTOR
-
context
protected final JmeOffscreenSurfaceContext context
The context.
-
listener
protected com.jme3.input.RawInputListener listener
The raw listener.
-
node
protected javafx.scene.Node node
The input node.
-
scene
protected javafx.scene.Scene scene
The scene.
-
initialized
protected boolean initialized
The flag of initializing this.
-
-
Constructor Detail
-
JfxInput
public JfxInput(JmeOffscreenSurfaceContext context)
-
-
Method Detail
-
hasNode
protected boolean hasNode()
Checks of existing the node.- Returns:
- true if the node is exist.
-
getNode
protected javafx.scene.Node getNode()
Gets the bound node.- Returns:
- the bound node.
-
getListener
protected com.jme3.input.RawInputListener getListener()
Gets the raw listener.- Returns:
- the raw listener.
-
bind
public void bind(javafx.scene.Node node)
Bind this input to the node.- Parameters:
node- the node.
-
unbind
public void unbind()
Unbind.
-
initialize
public void initialize()
- Specified by:
initializein interfacecom.jme3.input.Input
-
initializeImpl
protected void initializeImpl()
Initialize.
-
update
public void update()
- Specified by:
updatein interfacecom.jme3.input.Input
-
updateImpl
protected void updateImpl()
Update.
-
destroy
public void destroy()
- Specified by:
destroyin interfacecom.jme3.input.Input
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfacecom.jme3.input.Input
-
setInputListener
public void setInputListener(com.jme3.input.RawInputListener listener)
- Specified by:
setInputListenerin interfacecom.jme3.input.Input
-
getInputTimeNanos
public long getInputTimeNanos()
- Specified by:
getInputTimeNanosin interfacecom.jme3.input.Input
-
-