|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsynergynetframework.mtinput.ClickDetector
public class ClickDetector
Determines whether cursor released events constitute a single click. Needs to know when new cursors are pressed, via newCursorPressed. When a cursor is released, use isCursorReleaseASingleClick to determine whether a single click event occurred, based on the current sensitivity.
| Constructor Summary | |
|---|---|
ClickDetector(long time,
float distance)
Click detector, based on supplied sensitivity values. |
|
| Method Summary | |
|---|---|
int |
cursorReleasedGetClickCount(long id,
java.awt.geom.Point2D.Float 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,
java.awt.geom.Point2D.Float position,
synergynetframework.mtinput.ClickDetector.CursorDownRecord causedBy)
Checks if is cursor release a double click. |
void |
newCursorPressed(long id,
java.awt.geom.Point2D.Float 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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClickDetector(long time,
float distance)
time - the timedistance - the distance| Method Detail |
|---|
public int cursorReleasedGetClickCount(long id,
java.awt.geom.Point2D.Float position)
id - the idposition - the position
public float getDistanceSensitivity()
public long getDoubleClickTimeThreshold()
public long getTimeSensitivity()
public boolean isCursorReleaseADoubleClick(long id,
java.awt.geom.Point2D.Float position,
synergynetframework.mtinput.ClickDetector.CursorDownRecord causedBy)
id - the idposition - the positioncausedBy - the caused by
public void newCursorPressed(long id,
java.awt.geom.Point2D.Float position)
id - the idposition - the positionpublic void setDoubleClickTimeThreshold(long doubleClickTimeThreshold)
doubleClickTimeThreshold - the new double click time threshold
public void setSensitivity(long time,
float distance)
time - the timedistance - the distance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||