Package org.apache.batik.dom.events
Class DocumentEventSupport
java.lang.Object
org.apache.batik.dom.events.DocumentEventSupport
This class implements the behavior of DocumentEvent.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
To create a Custom event.static interface
This interface represents an event factory.protected static class
To create a keyboard event.protected static class
To create a key event.protected static class
To create a mouse event.protected static class
To create a mutation event.protected static class
To create a mutation name event.protected static class
To create a simple event.protected static class
To create a Text event.protected static class
To create a UI event. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CustomEvent type.static final String
The Event type.static final String
The Event type.protected HashMap<String,
DocumentEventSupport.EventFactory> The event factories table.static final String
The KeyEvent type.static final String
The KeyEvent type.static final String
The MouseEvent type.static final String
The MouseEvent type.static final String
The MutationEvent type.static final String
The MutationEvent type.static final String
The MutationNameEvent type.static final String
The TextEvent type.static final String
The UIEvent type.static final String
The UIEvent type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateEvent
(String eventType) Creates a new Event depending on the specified parameter.void
registerEventFactory
(String eventType, DocumentEventSupport.EventFactory factory) Registers a new EventFactory object.
-
Field Details
-
EVENT_TYPE
The Event type.- See Also:
-
MUTATION_EVENT_TYPE
The MutationEvent type.- See Also:
-
MUTATION_NAME_EVENT_TYPE
The MutationNameEvent type.- See Also:
-
MOUSE_EVENT_TYPE
The MouseEvent type.- See Also:
-
UI_EVENT_TYPE
The UIEvent type.- See Also:
-
KEYBOARD_EVENT_TYPE
The KeyEvent type.- See Also:
-
TEXT_EVENT_TYPE
The TextEvent type.- See Also:
-
CUSTOM_EVENT_TYPE
The CustomEvent type.- See Also:
-
EVENT_DOM2_TYPE
The Event type.- See Also:
-
MUTATION_EVENT_DOM2_TYPE
The MutationEvent type.- See Also:
-
MOUSE_EVENT_DOM2_TYPE
The MouseEvent type.- See Also:
-
UI_EVENT_DOM2_TYPE
The UIEvent type.- See Also:
-
KEY_EVENT_DOM2_TYPE
The KeyEvent type.- See Also:
-
eventFactories
The event factories table.
-
-
Constructor Details
-
DocumentEventSupport
public DocumentEventSupport()
-
-
Method Details
-
createEvent
Creates a new Event depending on the specified parameter.- Parameters:
eventType
- TheeventType
parameter specifies the type ofEvent
interface to be created. If theEvent
interface specified is supported by the implementation this method will return a newEvent
of the interface type requested. If theEvent
is to be dispatched via thedispatchEvent
method the appropriate event init method must be called after creation in order to initialize theEvent
's values. As an example, a user wishing to synthesize some kind ofUIEvent
would callcreateEvent
with the parameter "UIEvent". TheinitUIEvent
method could then be called on the newly createdUIEvent
to set the specific type of UIEvent to be dispatched and set its context information.ThecreateEvent
method is used in creatingEvent
s when it is either inconvenient or unnecessary for the user to create anEvent
themselves. In cases where the implementation providedEvent
is insufficient, users may supply their ownEvent
implementations for use with thedispatchEvent
method.- Returns:
- The newly created
Event
- Throws:
DOMException
- NOT_SUPPORTED_ERR: Raised if the implementation does not support the type ofEvent
interface requested
-
registerEventFactory
Registers a new EventFactory object.
-