|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
org.dvb.event.UserEvent
Represents a user event. A user event is defined by a family, a type and
either a code or a character. Unless stated otherwise, all constants used
in the specification of this class are defined in java.awt.event.KeyEvent
and its
parent classes.
Field Summary | |
static int |
UEF_KEY_EVENT
the family for events that are coming from the remote control or from the keyboard. |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
UserEvent(java.lang.Object source,
int family,
char keyChar,
long when)
Constructor for a new UserEvent object representing a key being typed. |
|
UserEvent(java.lang.Object source,
int family,
int type,
int code,
int modifiers,
long when)
Constructor for a new UserEvent object representing a key being pressed. |
Method Summary | |
int |
getCode()
Returns the event code. |
int |
getFamily()
Returns the event family. |
char |
getKeyChar()
Returns the character associated with the key in this event. |
int |
getModifiers()
Returns the modifiers flag for this event. |
int |
getType()
Returns the event type. |
long |
getWhen()
Returns the timestamp of when this event occurred. |
boolean |
isAltDown()
Returns whether or not the Alt modifier is down on this event. |
boolean |
isControlDown()
Returns whether or not the Control modifier is down on this event. |
boolean |
isMetaDown()
Returns whether or not the Meta modifier is down on this event. |
boolean |
isShiftDown()
Returns whether or not the Shift modifier is down on this event. |
Methods inherited from class java.util.EventObject |
getSource, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UEF_KEY_EVENT
Constructor Detail |
public UserEvent(java.lang.Object source, int family, int type, int code, int modifiers, long when)
source
- the EventManager
which is the source of the eventfamily
- the event family.type
- the event type. Either one of KEY_PRESSED or KEY_RELEASED.code
- the event code. One of the constants whose name begins in
"VK_" defined in java.awt.event.KeyEvent or org.havi.ui.event.HRcEvent.modifiers
- the modifiers active when the key was pressed. These
have the same semantics as modifiers in java.awt.event.KeyEvent
.when
- a long integer that specifies the time the event occurredpublic UserEvent(java.lang.Object source, int family, char keyChar, long when)
KEY_TYPED
events shall have no modifiers and hence shall not report
any modifiers as being down.
source
- the EventManager
which is the source of the eventfamily
- the event family.keyChar
- the character typedwhen
- a long integer that specifies the time the event occurredMethod Detail |
public int getFamily()
public int getType()
public int getCode()
public char getKeyChar()
public int getModifiers()
public boolean isShiftDown()
public boolean isControlDown()
public boolean isMetaDown()
public boolean isAltDown()
public long getWhen()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |