public class DOF2Event extends MotionEvent
ALT, ALT_GRAPH, CTRL, META, NO_ID, NO_MODIFIER_MASK, SHIFT
Constructor and Description |
---|
DOF2Event(DOF2Event prevEvent,
float x,
float y)
Construct a relative event from the given previous event, dof's and modifiers.
|
DOF2Event(DOF2Event prevEvent,
float x,
float y,
int modifiers,
int id)
Construct a relative event from the given previous event, dof's and modifiers.
|
DOF2Event(float dx,
float dy)
Construct an absolute event from the given dof's.
|
DOF2Event(float dx,
float dy,
int modifiers,
int id)
Construct an absolute event from the given dof's and modifiers.
|
DOF2Event(MotionEvent prevEvent,
float x,
float y)
Same as
this(prevEvent instanceof DOF2Event ? (DOF2Event) prevEvent : null, x, y) . |
DOF2Event(MotionEvent prevEvent,
float x,
float y,
int modifiers,
int id)
Same as
this(prevEvent instanceof DOF2Event ? (DOF2Event) prevEvent : null, x, y, modifiers, id) . |
Modifier and Type | Method and Description |
---|---|
DOF1Event |
dof1Event()
Convenience function that simply returns
return dof1Event(true) |
DOF1Event |
dof1Event(boolean fromX)
Reduces the event to a
DOF1Event (lossy reduction). |
float |
dx() |
float |
dy() |
boolean |
equals(Object obj) |
DOF2Event |
fire()
Same as
this.get() but sets the BogusEvent.fired() flag to true. |
DOF2Event |
flush()
Same as
this.get() but sets the BogusEvent.flushed() flag to true. |
DOF2Event |
get()
Returns a deep copy of the object.
|
int |
hashCode() |
boolean |
isNull()
Only
MotionEvent s may be null. |
void |
modulate(float[] sens)
Modulate the event dofs according to
sens . |
float |
prevX() |
float |
prevY() |
float |
x() |
float |
y() |
delay, distance, dof1Event, dof1Event, dof2Event, dof2Event, dof3Event, dof3Event, dof6Event, isAbsolute, isRelative, shortcut, speed
fired, flushed, id, isAltDown, isAltGraph, isControlDown, isMetaDown, isShiftDown, modifiers, modifiersText, timestamp
public DOF2Event(float dx, float dy, int modifiers, int id)
dx
- dy
- modifiers
- id
- public DOF2Event(MotionEvent prevEvent, float x, float y, int modifiers, int id)
this(prevEvent instanceof DOF2Event ? (DOF2Event) prevEvent : null, x, y, modifiers, id)
.public DOF2Event(DOF2Event prevEvent, float x, float y, int modifiers, int id)
If the BogusEvent.id()
of the prevEvent
is different then BogusEvent.id()
, sets
the MotionEvent.distance()
, MotionEvent.delay()
and MotionEvent.speed()
all to zero
.
prevEvent
- x
- y
- modifiers
- id
- public DOF2Event(float dx, float dy)
dx
- dy
- public DOF2Event(MotionEvent prevEvent, float x, float y)
this(prevEvent instanceof DOF2Event ? (DOF2Event) prevEvent : null, x, y)
.DOF2Event(DOF2Event, float, float)
public DOF2Event(DOF2Event prevEvent, float x, float y)
If the BogusEvent.id()
of the prevEvent
is different then BogusEvent.id()
, sets
the MotionEvent.distance()
, MotionEvent.delay()
and MotionEvent.speed()
all to zero
.
prevEvent
- x
- y
- public int hashCode()
hashCode
in class MotionEvent
public boolean equals(Object obj)
equals
in class MotionEvent
public DOF2Event get()
Copyable
Typical implementation should simple look like: return new Object(this)
.
get
in interface Copyable
get
in class MotionEvent
public DOF2Event flush()
BogusEvent
this.get()
but sets the BogusEvent.flushed()
flag to true. Only agents
may call this.flush
in class MotionEvent
BogusEvent.flushed()
public DOF2Event fire()
BogusEvent
this.get()
but sets the BogusEvent.fired()
flag to true. Only agents
may call this.fire
in class MotionEvent
BogusEvent.flushed()
public float x()
MotionEvent.isRelative()
public float dx()
public float prevX()
MotionEvent.isRelative()
public float y()
MotionEvent.isRelative()
public float dy()
public float prevY()
MotionEvent.isRelative()
public void modulate(float[] sens)
MotionEvent
sens
. Only meaningful if the event
MotionEvent.isAbsolute()
.modulate
in class MotionEvent
public boolean isNull()
BogusEvent
MotionEvent
s may be null.isNull
in class BogusEvent
public DOF1Event dof1Event()
return dof1Event(true)
dof1Event(boolean)
Processing Library proscene by Jean Pierre Charalambos. (c) 2014-2017 National University of Colombia