public class UserEvent extends EventObject
java.awt.event.KeyEvent and its
parent classes.| Modifier and Type | Field and Description |
|---|---|
static int |
UEF_KEY_EVENT
the family for events that are coming from the remote control or from
the keyboard.
|
source| Constructor and Description |
|---|
UserEvent(Object source,
int family,
char keyChar,
long when)
Constructor for a new UserEvent object representing a key being typed.
|
UserEvent(Object source,
int family,
int type,
int code,
int modifiers,
long when)
Constructor for a new UserEvent object representing a key being pressed.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
getSource, toStringpublic static final int UEF_KEY_EVENT
public UserEvent(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(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 occurredpublic 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()
Copyright © 2012 code4tv.com. All Rights Reserved.