ClickHandler Class Reference

Inheritance diagram for ClickHandler:

EventHandler ClickAdapter List of all members.

Public Member Functions

abstract void clicked (PenEvent e)
void handleEvent (PenEvent event)
 This method does the hard work of figuring out when a pen pressed, released, and clicked.
abstract void pressed (PenEvent e)
abstract void released (PenEvent e)
String toString ()

Protected Attributes

int clickCount = 1
 Use this variable to see if there was a double click, while handing a clicked() event.
int maxMillisBetweenMultipleClicks = 300

Classes

class  ClickNotifier

Detailed Description

Unlike Java Swing's MouseListener, the Pen & Paper Click Handler cannot sense mouseover. Therefore, there is no analogue to mouseEntered, Exited.

This software is distributed under the BSD License.

Author:
Ron B Yeh (ronyeh(AT)cs.stanford.edu)

Definition at line 18 of file ClickHandler.java.


Member Function Documentation

abstract void clicked ( PenEvent  e  )  [pure virtual]

Parameters:
e 

Implemented in ClickAdapter.

Referenced by ClickHandler.handleEvent().

void handleEvent ( PenEvent  event  )  [virtual]

This method does the hard work of figuring out when a pen pressed, released, and clicked.

It is up to the subclass to do something interesting with it once the events are triggered.

We also use the 20 ms filter heuristic that the InkCollector uses. We assume people can't click faster than 20ms.

See also:
edu.stanford.hci.r3.events.EventHandler.handleEvent(edu.stanford.hci.r3.events.PenEvent)

Implements EventHandler.

Definition at line 119 of file ClickHandler.java.

References ClickHandler.clickCount, ClickHandler.clicked(), PenEvent.getTimestamp(), PenEvent.isTypePenDown(), PenEvent.isTypePenUp(), ClickHandler.maxMillisBetweenMultipleClicks, ClickHandler.pressed(), and ClickHandler.released().

abstract void pressed ( PenEvent  e  )  [pure virtual]

Parameters:
e 

Implemented in ClickAdapter.

Referenced by ClickHandler.handleEvent().

abstract void released ( PenEvent  e  )  [pure virtual]

Parameters:
e 

Implemented in ClickAdapter.

Referenced by ClickHandler.handleEvent().

String toString (  )  [virtual]

Returns:
the Event Handler's Name

Implements EventHandler.

Definition at line 173 of file ClickHandler.java.


The documentation for this class was generated from the following file:
Generated on Sat Apr 14 18:21:41 2007 for R3 Paper Toolkit by  doxygen 1.4.7