Public Types | |
DOWN | |
enum | PenEventModifier { DOWN, SAMPLE, UP } |
Public Member Functions | |
PenEvent (int thePenID, String thePenName, long time, PenSample sample) | |
void | consume () |
Consume this event. | |
PenSample | getOriginalSample () |
WARNING: This is a dangerous method to use, if you do not know what you are doing. | |
int | getPenID () |
String | getPenName () |
PercentageCoordinates | getPercentageLocation () |
It will give you a percentage location, from which you can derive actual coordinates (by converting to inches, etc). | |
StreamedPatternCoordinates | getStreamedPatternCoordinate () |
WARNING: See getOriginalSample(). | |
long | getTimestamp () |
PenEventModifier | getType () |
boolean | isConsumed () |
boolean | isTypePenDown () |
boolean | isTypePenUp () |
void | setModifier (PenEventModifier modifier) |
TODO: Change this to an enum? | |
void | setOriginalSample (PenSample sample) |
Very low level data in case you want to process it. | |
void | setPenName (String name) |
The event engine will assign the pen name, which is the source of this event. | |
void | setPercentageLocation (PercentageCoordinates location) |
String | toString () |
This software is distributed under the BSD License.
Definition at line 18 of file PenEvent.java.
PenSample getOriginalSample | ( | ) |
WARNING: This is a dangerous method to use, if you do not know what you are doing.
The original pen samples have not been converted into the region's local coordinate system, so if the region happens to have tiled pattern, you may get unexpected results!
Use getPercentageLocation(...) instead!
Definition at line 99 of file PenEvent.java.
Referenced by StrokeHandler.handleEvent(), EventEngine.handlePenEvent(), and RegionComponent.RegionComponent().
int getPenID | ( | ) |
String getPenName | ( | ) |
PercentageCoordinates getPercentageLocation | ( | ) |
It will give you a percentage location, from which you can derive actual coordinates (by converting to inches, etc).
This coordinate will be duplicated when a PEN_UP happens, because the coordinate will be set to the last known good coordinate (captured during a regular, non PEN_UP sample).
Definition at line 124 of file PenEvent.java.
Referenced by LocationHandler.handleEvent(), InkCollector.handleEvent(), HandwritingRecognizer.handleEvent(), GestureHandler.handleEvent(), and RegionComponent.RegionComponent().
StreamedPatternCoordinates getStreamedPatternCoordinate | ( | ) |
WARNING: See getOriginalSample().
Do not use this value unless you _know_ what you are doing. It is OK to use this value if you are doing simple calculations and you are SURE that the samples all come from thes same pattern tile.
Definition at line 135 of file PenEvent.java.
Referenced by EventEngine.handlePenEvent().
long getTimestamp | ( | ) |
Definition at line 142 of file PenEvent.java.
Referenced by InkCollector.handleEvent(), HandwritingRecognizer.handleEvent(), ClickHandler.handleEvent(), and EventReplayManager.replay().
PenEventModifier getType | ( | ) |
Definition at line 149 of file PenEvent.java.
boolean isConsumed | ( | ) |
boolean isTypePenDown | ( | ) |
Definition at line 163 of file PenEvent.java.
Referenced by StrokeHandler.handleEvent(), InkCollector.handleEvent(), HandwritingRecognizer.handleEvent(), GestureHandler.handleEvent(), and ClickHandler.handleEvent().
boolean isTypePenUp | ( | ) |
Definition at line 170 of file PenEvent.java.
Referenced by StrokeHandler.handleEvent(), InkCollector.handleEvent(), HandwritingRecognizer.handleEvent(), GestureHandler.handleEvent(), ClickHandler.handleEvent(), and EventReplayManager.replay().
void setModifier | ( | PenEventModifier | modifier | ) |
TODO: Change this to an enum?
modifier |
Definition at line 179 of file PenEvent.java.
Referenced by EventReplayManager.createEventFromString().
void setOriginalSample | ( | PenSample | sample | ) |
Very low level data in case you want to process it.
sample |
Definition at line 188 of file PenEvent.java.
void setPenName | ( | String | name | ) |
The event engine will assign the pen name, which is the source of this event.
name |
Definition at line 197 of file PenEvent.java.
void setPercentageLocation | ( | PercentageCoordinates | location | ) |
location |
Definition at line 204 of file PenEvent.java.
Referenced by EventEngine.handlePenEvent(), and EventEngine.handlePenUpEvent().