public class ClickDetector
extends java.lang.Object
Constructor and Description |
---|
ClickDetector(long time,
float distance)
Click detector, based on supplied sensitivity values.
|
Modifier and Type | Method and Description |
---|---|
int |
cursorReleasedGetClickCount(long id,
com.jme3.math.Vector2f position)
Returns true if the released cursor is within the sensitivity values
required to constitute a single click.
|
float |
getDistanceSensitivity()
Gets the distance sensitivity.
|
long |
getDoubleClickTimeThreshold()
Gets the double click time threshold.
|
long |
getTimeSensitivity()
Gets the time sensitivity.
|
boolean |
isCursorReleaseADoubleClick(long id,
com.jme3.math.Vector2f position,
multiplicity3.input.utils.ClickDetector.CursorDownRecord causedBy)
Checks if is cursor release a double click.
|
void |
newCursorPressed(long id,
com.jme3.math.Vector2f position)
Register cursor - only registered cursors will ever pass the test of
being a single click when isCursorReleaseASingleClick is called.
|
void |
setDoubleClickTimeThreshold(long doubleClickTimeThreshold)
Sets the double click time threshold.
|
void |
setSensitivity(long time,
float distance)
Set new sensitivity values.
|
public ClickDetector(long time, float distance)
time
- distance
- public int cursorReleasedGetClickCount(long id, com.jme3.math.Vector2f position)
id
- position
- public float getDistanceSensitivity()
public long getDoubleClickTimeThreshold()
public long getTimeSensitivity()
public boolean isCursorReleaseADoubleClick(long id, com.jme3.math.Vector2f position, multiplicity3.input.utils.ClickDetector.CursorDownRecord causedBy)
id
- the idposition
- the positioncausedBy
- the caused bypublic void newCursorPressed(long id, com.jme3.math.Vector2f position)
id
- position
- public void setDoubleClickTimeThreshold(long doubleClickTimeThreshold)
doubleClickTimeThreshold
- the new double click time thresholdpublic void setSensitivity(long time, float distance)
time
- distance
-