Inheritance diagram for PenSimulator:
Public Member Functions | |
PenSimulator () | |
void | addLivePenListener (PenListener penListener) |
Adds a low-level pen data listener to the live pen. | |
Override void | mouseClicked (MouseEvent e) |
Override void | mouseDragged (MouseEvent e) |
Override void | mouseEntered (MouseEvent arg0) |
Override void | mouseExited (MouseEvent arg0) |
Override void | mouseMoved (MouseEvent arg0) |
Override void | mousePressed (MouseEvent e) |
Override void | mouseReleased (MouseEvent e) |
void | removeLivePenListener (PenListener penListener) |
Removes the pen listener from the live pen. | |
Override void | startLiveMode () |
Override void | stopLiveMode () |
This also contains a simple r-theta based ink simplification algorithm. Basically, if the distance of the current point is sufficiently far from the last two points, in terms of distance (r) or direction (theta), then we trigger a new pen sample. This algorithm might be applied to actual pen input in the future, to achieve ink simplification/beautification, etc.
This software is distributed under the BSD License.
Definition at line 38 of file PenSimulator.java.
void addLivePenListener | ( | PenListener | penListener | ) |
Adds a low-level pen data listener to the live pen.
You SHOULD call this after starting live mode.... However, we can cache the listener for you, if you really want. This is to eliminate annoying ordering constraints.
Subclasses *should* override this, and call the super, to actually make use of PenListeners.
penListener |
Reimplemented from PenInput.
Definition at line 53 of file PenSimulator.java.
void removeLivePenListener | ( | PenListener | penListener | ) |
Removes the pen listener from the live pen.
Subclasses *should* override this, and call the super's implementation if necessary, to actually make use of PenListeners.
penListener |
Reimplemented from PenInput.
Definition at line 150 of file PenSimulator.java.