org.ocap.event.UserEvent.html Maven / Gradle / Ivy
UserEvent
Overview
Package
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
org.ocap.event
Class UserEvent
java.lang.Object
java.util.EventObject
org.dvb.event.UserEvent
org.ocap.event.UserEvent
- All Implemented Interfaces:
- java.io.Serializable
public class UserEvent
- extends 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 this class are defined in org.ocap.ui.event.OcRcEvent
,
java.awt.event.KeyEvent
and their parent classes.
- See Also:
- Serialized Form
Field Summary |
---|
Fields inherited from class org.dvb.event.UserEvent |
---|
UEF_KEY_EVENT |
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 | |
---|---|
void |
setCode(int code)
Modifies the event code. |
void |
setKeyChar(char keychar)
Modifies the character associated with the key in this event. |
Methods inherited from class org.dvb.event.UserEvent |
---|
getCode, getFamily, getKeyChar, getModifiers, getType, getWhen, isAltDown, isControlDown, isMetaDown, isShiftDown |
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 |
Constructor Detail |
---|
UserEvent
public 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.
- Parameters:
source
- theEventManager
which is the source of the event.family
- 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.ui.event.KeyEvent, org.havi.ui.event or org.ocap.ui.event.OcRcEvent.modifiers
- the modifiers active when the key was pressed. These have the same semantics as modifiers injava.awt.event.KeyEvent
.when
- a long integer that specifies the time the event occurred.
UserEvent
public UserEvent(java.lang.Object source, int family, char keyChar, long when)
- Constructor for a new UserEvent object representing a key being typed.
This is the combination of a key being pressed and then being released.
The type of UserEvents created with this constructor shall be KEY_TYPED.
Key combinations which do not result in characters, such as action keys
like F1, shall not generate KEY_TYPED events.
- Parameters:
source
- theEventManager
which is the source of the eventfamily
- the event family.keyChar
- the character typedwhen
- a long integer that specifies the time the event occurred- Since:
- MHP 1.0.1
Method Detail |
---|
setCode
public void setCode(int code)
- Modifies the event code. For KEY_TYPED events, the code is VK_UNDEFINED.
- Throws:
java.lang.SecurityException
- if the caller does not have monitorapplication permission ("filterUserEvents").- Since:
- OCAP 1.0
setKeyChar
public void setKeyChar(char keychar)
- Modifies the character associated with the key in this event. If no
valid Unicode character exists for this key event, keyChar must be
CHAR_UNDEFINED.
- Throws:
java.lang.SecurityException
- if the caller does not have monitorapplication permission ("filterUserEvents").- Since:
- OCAP 1.0
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |