edu.stanford.hci.r3.events.handlers
Class ClickHandler
java.lang.Object
edu.stanford.hci.r3.events.EventHandler
edu.stanford.hci.r3.events.handlers.ClickHandler
- Direct Known Subclasses:
- ClickAdapter
public abstract class ClickHandler
- extends EventHandler
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
clickCount
protected int clickCount
- Use this variable to see if there was a double click, while handing a clicked() event.
maxMillisBetweenMultipleClicks
protected int maxMillisBetweenMultipleClicks
ClickHandler
public ClickHandler()
clicked
public abstract void clicked(PenEvent e)
- Parameters:
e
-
handleEvent
public void handleEvent(PenEvent event)
- 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.
- Specified by:
handleEvent
in class EventHandler
- See Also:
EventHandler.handleEvent(edu.stanford.hci.r3.events.PenEvent)
pressed
public abstract void pressed(PenEvent e)
- Parameters:
e
-
released
public abstract void released(PenEvent e)
- Parameters:
e
-
toString
public java.lang.String toString()
- Specified by:
toString
in class EventHandler
- Returns:
- the Event Handler's Name