Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.xml.dom.DomEvent
Applications may define application specific event subclasses, but should otherwise use the DocumentTraversal interface to acquire event objects.
Nested Class Summary | |
static class |
|
static class |
|
Fields inherited from interface org.w3c.dom.events.Event | |
AT_TARGET , BUBBLING_PHASE , CAPTURING_PHASE |
Constructor Summary | |
|
Method Summary | |
boolean |
|
boolean |
|
EventTarget |
|
short |
|
EventTarget |
|
long |
|
String |
|
void |
|
void |
|
void |
|
String |
|
public final boolean getBubbles()
Returns true if the news of the event bubbles to tree tops (as specified during initialization).
- Specified by:
- getBubbles in interface Event
public final boolean getCancelable()
Returns true if the default handling may be canceled (as specified during initialization).
- Specified by:
- getCancelable in interface Event
public final EventTarget getCurrentTarget()
Returns the target to which events are currently being delivered. When capturing or bubbling, this will not be what getTarget returns.
- Specified by:
- getCurrentTarget in interface Event
public final short getEventPhase()
Returns CAPTURING_PHASE, AT_TARGET, or BUBBLING; only meaningful within EventListener.handleEvent
- Specified by:
- getEventPhase in interface Event
public final EventTarget getTarget()
Returns event's target; delivery of an event is initiated by a target.dispatchEvent(event) invocation.
public final long getTimeStamp()
Returns the event's timestamp.
- Specified by:
- getTimeStamp in interface Event
public final String getType()
Returns the event's type (name) as initialized
- Specified by:
- getType in interface Event
public void initEvent(String typeArg, boolean canBubbleArg, boolean cancelableArg)
Initializes basic event state.
- Specified by:
- initEvent in interface Event
public final void preventDefault()
Requests that whoever dispatched the event not perform their default processing when event delivery completes. Initializes event timestamp.
- Specified by:
- preventDefault in interface Event
public void stopPropagation()
Requests the event no longer be captured or bubbled; only listeners on the event target will see the event, if they haven't yet been notified.Avoid using this except for application-specific events, for which you the protocol explicitly "blesses" the use of this with some event types. Otherwise, you are likely to break algorithms which depend on event notification either directly or through bubbling or capturing.
Note that this method is not final, specifically to enable enforcing of policies about events always propagating.
- Specified by:
- stopPropagation in interface Event
public String toString()
Returns a basic printable description of the event's type, state, and delivery conditions