public class DOF1Event extends MotionEvent
MotionEvent with one degree of freedom ( x()).ALT, ALT_GRAPH, CTRL, META, NO_ID, NO_MODIFIER_MASK, SHIFT| Constructor and Description |
|---|
DOF1Event(DOF1Event prevEvent,
float x)
Construct a relative DOF1 event.
|
DOF1Event(DOF1Event prevEvent,
float x,
int modifiers,
int id)
Construct a relative DOF1 event.
|
DOF1Event(float dx)
Construct an absolute DOF1 event.
|
DOF1Event(float dx,
int modifiers,
int id)
Construct an absolute DOF1 event.
|
DOF1Event(MotionEvent prevEvent,
float x)
Same as
this(prevEvent instanceof DOF1Event ? (DOF1Event) prevEvent : null, x). |
DOF1Event(MotionEvent prevEvent,
float x,
int modifiers,
int id)
Same as
this(prevEvent instanceof DOF1Event ? (DOF1Event) prevEvent : null, x, modifiers, id). |
| Modifier and Type | Method and Description |
|---|---|
float |
dx() |
boolean |
equals(Object obj) |
DOF1Event |
fire()
Same as
this.get() but sets the BogusEvent.fired() flag to true. |
DOF1Event |
flush()
Same as
this.get() but sets the BogusEvent.flushed() flag to true. |
DOF1Event |
get()
Returns a deep copy of the object.
|
int |
hashCode() |
boolean |
isNull()
Only
MotionEvents may be null. |
void |
modulate(float[] sens)
Modulate the event dofs according to
sens. |
float |
prevX() |
float |
x() |
delay, distance, dof1Event, dof1Event, dof2Event, dof2Event, dof3Event, dof3Event, dof6Event, isAbsolute, isRelative, shortcut, speedfired, flushed, id, isAltDown, isAltGraph, isControlDown, isMetaDown, isShiftDown, modifiers, modifiersText, timestamppublic DOF1Event(float dx,
int modifiers,
int id)
dx - 1-dofmodifiers - MotionShortcut modifiersid - MotionShortcut gesture-idpublic DOF1Event(MotionEvent prevEvent, float x, int modifiers, int id)
this(prevEvent instanceof DOF1Event ? (DOF1Event) prevEvent : null, x, modifiers, id).DOF1Event(DOF1Event, float, int, int)public DOF1Event(DOF1Event prevEvent, float x, 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 - 1-dofmodifiers - MotionShortcut modifiersid - MotionShortcut gesture-idpublic DOF1Event(float dx)
dx - 1-dofpublic DOF1Event(MotionEvent prevEvent, float x)
this(prevEvent instanceof DOF1Event ? (DOF1Event) prevEvent : null, x).DOF1Event(DOF1Event, float)public DOF1Event(DOF1Event prevEvent, float x)
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 - 1-dofpublic int hashCode()
hashCode in class MotionEventpublic boolean equals(Object obj)
equals in class MotionEventpublic DOF1Event get()
Copyable
Typical implementation should simple look like: return new Object(this).
get in interface Copyableget in class MotionEventpublic DOF1Event flush()
BogusEventthis.get() but sets the BogusEvent.flushed() flag to true. Only agents
may call this.flush in class MotionEventBogusEvent.flushed()public DOF1Event fire()
BogusEventthis.get() but sets the BogusEvent.fired() flag to true. Only agents
may call this.fire in class MotionEventBogusEvent.flushed()public float x()
MotionEvent.isRelative()public float dx()
public float prevX()
MotionEvent.isRelative()public void modulate(float[] sens)
MotionEventsens. Only meaningful if the event
MotionEvent.isAbsolute().modulate in class MotionEventpublic boolean isNull()
BogusEventMotionEvents may be null.isNull in class BogusEventProcessing Library proscene by Jean Pierre Charalambos. (c) 2014-2017 National University of Colombia