util
Class EventWrapper
java.lang.Object
util.EventWrapper
- public class EventWrapper
- extends java.lang.Object
Provides type-safe access to different event types.
This class wraps a single event of some type.
The get methods return null except for the one that represents
the actual runtime type of the contained event.
|
Field Summary |
static java.lang.String |
NO_EVENT
Value returned from getEventClassName when this wraps null. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NO_EVENT
public static final java.lang.String NO_EVENT
- Value returned from getEventClassName when this wraps null.
- See Also:
- Constant Field Values
EventWrapper
public EventWrapper(java.awt.event.ActionEvent e)
EventWrapper
public EventWrapper(java.awt.event.MouseEvent e)
EventWrapper
public EventWrapper(java.awt.event.KeyEvent e)
getActionEvent
public java.awt.event.ActionEvent getActionEvent()
- Returns:
- the wrapped event or null if the runtime type is not ActionEvent.
getMouseEvent
public java.awt.event.MouseEvent getMouseEvent()
- Returns:
- the wrapped event or null if the runtime type is not MouseEvent.
getKeyEvent
public java.awt.event.KeyEvent getKeyEvent()
- Returns:
- the wrapped event or null if the runtime type is not KeyEvent.
getEventClassName
public java.lang.String getEventClassName()
requestCallback
public void requestCallback(int level)
getCallbackLevel
public int getCallbackLevel()
toString
public java.lang.String toString()
© 2001-2005 University of Oregon.
Eugene OR 97403, U.S.A. All Rights Reserved.