com::google::scrollview::events::SVEventHandler Class Reference
Inherits edu::umd::cs::piccolo::event::PBasicInputEventHandler, java::awt::event::ActionListener, java::awt::event::KeyListener, and java::awt::event::WindowListener.
List of all members.
Detailed Description
The ScrollViewEventHandler takes care of any events which might happen on the canvas and converts them to an according SVEvent, which is (using the processEvent method) then added to a message queue. All events from the message queue get sent gradually
- Author:
- wanke@google.com
Constructor & Destructor Documentation
com::google::scrollview::events::SVEventHandler::SVEventHandler |
( |
SVWindow |
wdw |
) |
[inline] |
Member Function Documentation
void com::google::scrollview::events::SVEventHandler::actionPerformed |
( |
ActionEvent |
e |
) |
[inline] |
The only associated object with this is the timer, so we use it to send a SVET_HOVER event.
void com::google::scrollview::events::SVEventHandler::keyPressed |
( |
KeyEvent |
e |
) |
[inline] |
A key was pressed - create an SVET_INPUT event.
NOTE: Might be useful to specify hotkeys.
Implementation note: The keyListener provided by Piccolo seems to be broken, so we use the AWT listener directly. There are never any keyTyped events received either so we are stuck with physical keys, which is very ugly.
void com::google::scrollview::events::SVEventHandler::keyReleased |
( |
KeyEvent |
e |
) |
[inline] |
These are all events we do not care about and throw away
void com::google::scrollview::events::SVEventHandler::keyTyped |
( |
KeyEvent |
e |
) |
[inline] |
void com::google::scrollview::events::SVEventHandler::mouseClicked |
( |
PInputEvent |
e |
) |
[inline] |
The mouse is clicked - create an SVET_CLICK event.
void com::google::scrollview::events::SVEventHandler::mouseDragged |
( |
PInputEvent |
e |
) |
[inline] |
The mouse is getting dragged - create an SVET_MOUSE event.
void com::google::scrollview::events::SVEventHandler::mouseEntered |
( |
PInputEvent |
e |
) |
[inline] |
The mouse entered the window. Start the timer, which will then emit SVET_HOVER events every X ms.
void com::google::scrollview::events::SVEventHandler::mouseExited |
( |
PInputEvent |
e |
) |
[inline] |
The mouse exited the window Stop the timer, so no more SVET_HOVER events will emit.
void com::google::scrollview::events::SVEventHandler::mouseMoved |
( |
PInputEvent |
e |
) |
[inline] |
The mouse was moved - create an SVET_MOTION event. NOTE: This obviously creates a lot of traffic and, depending on the type of application, could quite possibly be disabled.
void com::google::scrollview::events::SVEventHandler::mousePressed |
( |
PInputEvent |
e |
) |
[inline] |
The mouse key is pressed (and keeps getting pressed). Depending on the OS, show a popup menu (if the button pressed is associated with popup menus, like the RMB under windows&linux) or otherwise save the position (in case it is a selection).
void com::google::scrollview::events::SVEventHandler::mouseReleased |
( |
PInputEvent |
e |
) |
[inline] |
The mouse was released. Depending on the OS, show a popup menu (if the button pressed is associated with popup menus, like the RMB under windows&linux) or otherwise create an SVET_SELECTION event.
void com::google::scrollview::events::SVEventHandler::mouseWheelRotated |
( |
PInputEvent |
e |
) |
[inline] |
The mouse wheel is used to zoom in and out of the viewport and center on the (x,y) position the mouse is currently on.
void com::google::scrollview::events::SVEventHandler::windowActivated |
( |
WindowEvent |
e |
) |
[inline] |
void com::google::scrollview::events::SVEventHandler::windowClosed |
( |
WindowEvent |
e |
) |
[inline] |
void com::google::scrollview::events::SVEventHandler::windowClosing |
( |
WindowEvent |
e |
) |
[inline] |
A window is closed (by the 'x') - create an SVET_DESTROY event. If it was the last open Window, also send an SVET_EXIT event (but do not exit unless the client says so).
void com::google::scrollview::events::SVEventHandler::windowDeactivated |
( |
WindowEvent |
e |
) |
[inline] |
void com::google::scrollview::events::SVEventHandler::windowDeiconified |
( |
WindowEvent |
e |
) |
[inline] |
void com::google::scrollview::events::SVEventHandler::windowIconified |
( |
WindowEvent |
e |
) |
[inline] |
void com::google::scrollview::events::SVEventHandler::windowOpened |
( |
WindowEvent |
e |
) |
[inline] |
Member Data Documentation
Necessary to wait for a defined period of time (for SVET_HOVER).
The documentation for this class was generated from the following file: