public class DocumentEventSupport
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
DocumentEventSupport.CustomEventFactory
To create a Custom event.
|
static interface |
DocumentEventSupport.EventFactory
This interface represents an event factory.
|
protected static class |
DocumentEventSupport.KeyboardEventFactory
To create a keyboard event.
|
protected static class |
DocumentEventSupport.KeyEventFactory
To create a key event.
|
protected static class |
DocumentEventSupport.MouseEventFactory
To create a mouse event.
|
protected static class |
DocumentEventSupport.MutationEventFactory
To create a mutation event.
|
protected static class |
DocumentEventSupport.MutationNameEventFactory
To create a mutation name event.
|
protected static class |
DocumentEventSupport.SimpleEventFactory
To create a simple event.
|
protected static class |
DocumentEventSupport.TextEventFactory
To create a Text event.
|
protected static class |
DocumentEventSupport.UIEventFactory
To create a UI event.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CUSTOM_EVENT_TYPE
The CustomEvent type.
|
static java.lang.String |
EVENT_DOM2_TYPE
The Event type.
|
static java.lang.String |
EVENT_TYPE
The Event type.
|
protected java.util.HashMap<java.lang.String,DocumentEventSupport.EventFactory> |
eventFactories
The event factories table.
|
static java.lang.String |
KEY_EVENT_DOM2_TYPE
The KeyEvent type.
|
static java.lang.String |
KEYBOARD_EVENT_TYPE
The KeyEvent type.
|
static java.lang.String |
MOUSE_EVENT_DOM2_TYPE
The MouseEvent type.
|
static java.lang.String |
MOUSE_EVENT_TYPE
The MouseEvent type.
|
static java.lang.String |
MUTATION_EVENT_DOM2_TYPE
The MutationEvent type.
|
static java.lang.String |
MUTATION_EVENT_TYPE
The MutationEvent type.
|
static java.lang.String |
MUTATION_NAME_EVENT_TYPE
The MutationNameEvent type.
|
static java.lang.String |
TEXT_EVENT_TYPE
The TextEvent type.
|
static java.lang.String |
UI_EVENT_DOM2_TYPE
The UIEvent type.
|
static java.lang.String |
UI_EVENT_TYPE
The UIEvent type.
|
Constructor and Description |
---|
DocumentEventSupport() |
Modifier and Type | Method and Description |
---|---|
Event |
createEvent(java.lang.String eventType)
Creates a new Event depending on the specified parameter.
|
void |
registerEventFactory(java.lang.String eventType,
DocumentEventSupport.EventFactory factory)
Registers a new EventFactory object.
|
public static final java.lang.String EVENT_TYPE
public static final java.lang.String MUTATION_EVENT_TYPE
public static final java.lang.String MUTATION_NAME_EVENT_TYPE
public static final java.lang.String MOUSE_EVENT_TYPE
public static final java.lang.String UI_EVENT_TYPE
public static final java.lang.String KEYBOARD_EVENT_TYPE
public static final java.lang.String TEXT_EVENT_TYPE
public static final java.lang.String CUSTOM_EVENT_TYPE
public static final java.lang.String EVENT_DOM2_TYPE
public static final java.lang.String MUTATION_EVENT_DOM2_TYPE
public static final java.lang.String MOUSE_EVENT_DOM2_TYPE
public static final java.lang.String UI_EVENT_DOM2_TYPE
public static final java.lang.String KEY_EVENT_DOM2_TYPE
protected java.util.HashMap<java.lang.String,DocumentEventSupport.EventFactory> eventFactories
public Event createEvent(java.lang.String eventType) throws DOMException
eventType
- The eventType
parameter specifies the
type of Event
interface to be created. If the
Event
interface specified is supported by the
implementation this method will return a new Event
of
the interface type requested. If the Event
is to be
dispatched via the dispatchEvent
method the
appropriate event init method must be called after creation in order
to initialize the Event
's values. As an example, a
user wishing to synthesize some kind of UIEvent
would
call createEvent
with the parameter "UIEvent". The
initUIEvent
method could then be called on the newly
created UIEvent
to set the specific type of UIEvent to
be dispatched and set its context information.The
createEvent
method is used in creating
Event
s when it is either inconvenient or unnecessary
for the user to create an Event
themselves. In cases
where the implementation provided Event
is
insufficient, users may supply their own Event
implementations for use with the dispatchEvent
method.Event
DOMException
- NOT_SUPPORTED_ERR: Raised if the implementation does not support the
type of Event
interface requestedpublic void registerEventFactory(java.lang.String eventType, DocumentEventSupport.EventFactory factory)
Copyright © 2022 Apache Software Foundation. All Rights Reserved.