APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.dom.events

public Class EventImpl

extends Object
implements Event
Class Inheritance
All Implemented Interfaces
org.w3c.dom.events.Event
Known Direct Subclasses
com.sun.org.apache.xerces.internal.dom.events.MutationEventImpl
Imports
org.w3c.dom.events.Event, .EventTarget

EventImpl is an implementation of the basic "generic" DOM Level 2 Event object. It may be subclassed by more specialized event sets. Note that in our implementation, events are re-dispatchable (dispatch clears the stopPropagation and preventDefault flags before it starts); I believe that is the DOM's intent but I don't see an explicit statement to this effect.

Field Summary

Modifier and TypeField and Description
public boolean
public boolean
public EventTarget
public short
public boolean
public boolean
public boolean
public EventTarget
protected long
public String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true iff this Event is of a class and type which supports bubbling. In the generic case, this is True.
getBubbles
()

Implements org.w3c.dom.events.Event.getBubbles.

Used to indicate whether or not an event is a bubbling event.

public boolean

Returns:

true iff this Event is of a class and type which (a) has a Default Behavior in this DOM, and (b)allows cancellation (blocking) of that behavior. In the generic case, this is False.
getCancelable
()

Implements org.w3c.dom.events.Event.getCancelable.

Used to indicate whether or not an event can have its default action prevented.

public EventTarget

Returns:

the Node (EventTarget) whose EventListeners are currently being processed. During capture and bubble phases, this may not be the target node.
getCurrentTarget
()

Implements org.w3c.dom.events.Event.getCurrentTarget.

Used to indicate the EventTarget whose EventListeners are currently being processed.

public short

Returns:

the current processing phase for this event -- CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE. (There may be an internal DEFAULT_PHASE as well, but the users won't see it.)
getEventPhase
()

Implements org.w3c.dom.events.Event.getEventPhase.

Used to indicate which phase of event flow is currently being evaluated.

public EventTarget

Returns:

the EventTarget (Node) to which the event was originally dispatched.
getTarget
()

Implements org.w3c.dom.events.Event.getTarget.

Used to indicate the EventTarget to which the event was originally dispatched.

public long
getTimeStamp()

Implements org.w3c.dom.events.Event.getTimeStamp.

Used to specify the time (in milliseconds relative to the epoch) at which the event was created.

public String

Returns:

event name as a string
getType
()

Implements org.w3c.dom.events.Event.getType.

The name of the event (case-insensitive).

public void
initEvent(String eventTypeArg, boolean canBubbleArg, boolean cancelableArg)

Implements org.w3c.dom.events.Event.initEvent.

The DOM doesn't deal with constructors, so instead we have an initializer call to set most of the read-only fields.

public void
preventDefault()

Implements org.w3c.dom.events.Event.preventDefault.

Prevents any default processing built into the target node from occurring.

public void
stopPropagation()

Implements org.w3c.dom.events.Event.stopPropagation.

Causes exit from in-progress event dispatch before the next currentTarget is selected.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bubblesback to summary
public boolean bubbles
cancelableback to summary
public boolean cancelable
currentTargetback to summary
public EventTarget currentTarget
eventPhaseback to summary
public short eventPhase
initializedback to summary
public boolean initialized
preventDefaultback to summary
public boolean preventDefault
stopPropagationback to summary
public boolean stopPropagation
targetback to summary
public EventTarget target
timeStampback to summary
protected long timeStamp
typeback to summary
public String type

Constructor Detail

EventImplback to summary
public EventImpl()

Method Detail

getBubblesback to summary
public boolean getBubbles()

Implements org.w3c.dom.events.Event.getBubbles.

Doc from org.w3c.dom.events.Event.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.

Returns:boolean

true iff this Event is of a class and type which supports bubbling. In the generic case, this is True.

getCancelableback to summary
public boolean getCancelable()

Implements org.w3c.dom.events.Event.getCancelable.

Doc from org.w3c.dom.events.Event.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.

Returns:boolean

true iff this Event is of a class and type which (a) has a Default Behavior in this DOM, and (b)allows cancellation (blocking) of that behavior. In the generic case, this is False.

getCurrentTargetback to summary
public EventTarget getCurrentTarget()

Implements org.w3c.dom.events.Event.getCurrentTarget.

Doc from org.w3c.dom.events.Event.getCurrentTarget.

Used to indicate the EventTarget whose EventListeners are currently being processed. This is particularly useful during capturing and bubbling.

Returns:EventTarget

the Node (EventTarget) whose EventListeners are currently being processed. During capture and bubble phases, this may not be the target node.

getEventPhaseback to summary
public short getEventPhase()

Implements org.w3c.dom.events.Event.getEventPhase.

Doc from org.w3c.dom.events.Event.getEventPhase.

Used to indicate which phase of event flow is currently being evaluated.

Returns:short

the current processing phase for this event -- CAPTURING_PHASE, AT_TARGET, BUBBLING_PHASE. (There may be an internal DEFAULT_PHASE as well, but the users won't see it.)

getTargetback to summary
public EventTarget getTarget()

Implements org.w3c.dom.events.Event.getTarget.

Doc from org.w3c.dom.events.Event.getTarget.

Used to indicate the EventTarget to which the event was originally dispatched.

Returns:EventTarget

the EventTarget (Node) to which the event was originally dispatched.

getTimeStampback to summary
public long getTimeStamp()

Implements org.w3c.dom.events.Event.getTimeStamp.

Doc from org.w3c.dom.events.Event.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 timeStamp may be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970.

getTypeback to summary
public String getType()

Implements org.w3c.dom.events.Event.getType.

Doc from org.w3c.dom.events.Event.getType.

The name of the event (case-insensitive). The name must be an XML name.

Returns:String

event name as a string

initEventback to summary
public void initEvent(String eventTypeArg, boolean canBubbleArg, boolean cancelableArg)

Implements org.w3c.dom.events.Event.initEvent.

The DOM doesn't deal with constructors, so instead we have an initializer call to set most of the read-only fields. The others are set, and reset, by the event subsystem during dispatch.

Note that init() -- and the subclass-specific initWhatever() calls -- may be reinvoked. At least one initialization is required; repeated initializations overwrite the event with new values of their parameters.

preventDefaultback to summary
public void preventDefault()

Implements org.w3c.dom.events.Event.preventDefault.

Prevents any default processing built into the target node from occurring.

stopPropagationback to summary
public void stopPropagation()

Implements org.w3c.dom.events.Event.stopPropagation.

Causes exit from in-progress event dispatch before the next currentTarget is selected. Replaces the preventBubble() and preventCapture() methods which were present in early drafts; they may be reintroduced in future levels of the DOM.