Event interface is used to provide contextual information
about an event to the handler processing the event. An object which
implements the Event interface is generally passed as the
first parameter to an event handler. More specific context information is
passed to event handlers by deriving additional interfaces from
Event which contain information directly relating to the
type of event they accompany. These derived interfaces are also
implemented by the object passed to the event listener.
See also the Document Object Model (DOM) Level 2 Events Specification.
| Modifier and Type | Field and Description |
|---|---|
| public static final short | AT_TARGET
The event is currently being evaluated at the target
|
| public static final short | BUBBLING_PHASE
The current event phase is the bubbling phase. |
| public static final short | CAPTURING_PHASE
The current event phase is the capturing phase. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public EventTarget | getCurrentTarget()
Used to indicate the |
| public short | |
| public EventTarget | |
| public long | getTimeStamp()
Used to specify the time (in milliseconds relative to the epoch) at which the event was created. |
| public String | |
| public void | initEvent(String
Specifies the event type. This type may be any
event type currently defined in this specification or a new event
type.. The string must be an XML name. Any new event type must not
begin with any upper, lower, or mixed case version of the string
"DOM". This prefix is reserved for future DOM event sets. It is
also strongly recommended that third parties adding their own
events use their own prefix to avoid confusion and lessen the
probability of conflicts with other new events. eventTypeArg, boolean Specifies whether or not the event can bubble. canBubbleArg, boolean Specifies whether or not the event's default
action can be prevented. cancelableArg)The |
| public void | preventDefault()
If an event is cancelable, the |
| public void | stopPropagation()
The |
| AT_TARGET | back to summary |
|---|---|
| public static final short AT_TARGET The event is currently being evaluated at the target
| |
| BUBBLING_PHASE | back to summary |
|---|---|
| public static final short BUBBLING_PHASE The current event phase is the bubbling phase. | |
| CAPTURING_PHASE | back to summary |
|---|---|
| public static final short CAPTURING_PHASE The current event phase is the capturing phase. | |
| getBubbles | back to summary |
|---|---|
| public boolean getBubbles() Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false. | |
| getCancelable | back to summary |
|---|---|
| public boolean getCancelable() Used to indicate whether or not an event can have its default action prevented. If the default action can be prevented the value is true, else the value is false. | |
| getCurrentTarget | back to summary |
|---|---|
| public EventTarget getCurrentTarget() Used to indicate the | |
| getEventPhase | back to summary |
|---|---|
| public short getEventPhase() Used to indicate which phase of event flow is currently being evaluated. | |
| getTarget | back to summary |
|---|---|
| public EventTarget getTarget() Used to indicate the | |
| getTimeStamp | back to summary |
|---|---|
| public long getTimeStamp() Used to specify the time (in milliseconds relative to the epoch) at
which the event was created. Due to the fact that some systems may
not provide this information the value of | |
| getType | back to summary |
|---|---|
| public String getType() The name of the event (case-insensitive). The name must be an XML name. | |
| initEvent | back to summary |
|---|---|
| public void initEvent(String eventTypeArg, boolean canBubbleArg, boolean cancelableArg) The
| |
| preventDefault | back to summary |
|---|---|
| public void preventDefault() If an event is cancelable, the | |
| stopPropagation | back to summary |
|---|---|
| public void stopPropagation() The | |