|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.claudio.pen.input.Event
public final class Event
Hold the data for an event.
Copyright (C) 2007-2008 Claudio Nieder <private@claudio.ch>, CH-8610 Uster
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
| Field Summary | |
|---|---|
short |
code
Code (ABS_X etc.) as supplied by the event device |
PenState |
penState
Pen state |
long |
timestamp
Time stamp as supplied by the event device. |
short |
type
Type (EV_ABS etc.) as supplied by the event device |
int |
value
value as supplied by the event device |
int |
x
Absolute x coordinate |
int |
y
Absolute |
| Constructor Summary | |
|---|---|
Event(int lastX,
int lastY,
PenState lastState)
Create a new event and initialise it with the given last coordinate values. |
|
Event(long time,
short typeArg,
short codeArg,
int valueArg)
Creates an Event object out of an input handler event |
|
| Method Summary | |
|---|---|
Event |
clone()
|
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
isSync()
Return true if this event is a snc event EV_SYN indicating that all preceding invents since the lasy sync belong together. |
long |
javaTime()
Return a time stamp conforming to java time. |
static void |
main(java.lang.String[] args)
Print license. |
java.lang.String |
toString()
|
void |
update(Event other)
Updates this event considering the values found in the other event. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public long timestamp
public short type
public short code
public int value
public int x
public int y
public PenState penState
| Constructor Detail |
|---|
public Event(long time,
short typeArg,
short codeArg,
int valueArg)
time - time stamptypeArg - event type (e.g. EV_ABS)codeArg - event code (e.g. ABS_X)valueArg - event value
public Event(int lastX,
int lastY,
PenState lastState)
lastX - lastY - lastState - | Method Detail |
|---|
public void update(Event other)
other - eventpublic boolean isSync()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public long javaTime()
public Event clone()
clone in class java.lang.ObjectObject.clone()public static void main(java.lang.String[] args)
args - ignored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||