edu.cmu.sun.controller
Class HoverEventAdapter
java.lang.Object
edu.cmu.sun.controller.HoverEventAdapter
public class HoverEventAdapter
- extends java.lang.Object
Since Looking glass does not provide hover events,
this simple class parses low level LgEvents
an notifies a listener when a hover action occours.
However, hover is done slightly differently than
normal. In this implementation, we start a timer
when a mouse enters a component. If the timer
goes off before the mouse has exited the component,
then we count it as a hover event.
This is a very different behavior from normal hover
actions which look for when the mosue has stopped moving
for a set period of time.
- Author:
- Braden Kowitz, Jessica Smith
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_HOVER_TIME
private static final int DEFAULT_HOVER_TIME
- See Also:
- Constant Field Values
listener
HoverEventAdapter.Listener listener
time
int time
timer
java.util.Timer timer
HoverEventAdapter
public HoverEventAdapter(HoverEventAdapter.Listener listener)
HoverEventAdapter
public HoverEventAdapter(HoverEventAdapter.Listener listener,
int msec)
processEvent
public void processEvent(LgEvent e)
startTimer
private void startTimer()
stopTimer
private void stopTimer()
getTargetEventClasses
public java.lang.Class<LgEvent>[] getTargetEventClasses()