Class DocumentEventSupport
java.lang.Object
org.apache.batik.dom.events.DocumentEventSupport
This class implements the behavior of DocumentEvent.
- Version:
- $Id$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classTo create a Custom event.static interfaceThis interface represents an event factory.protected static classTo create a keyboard event.protected static classTo create a key event.protected static classTo create a mouse event.protected static classTo create a mutation event.protected static classTo create a mutation name event.protected static classTo create a simple event.protected static classTo create a Text event.protected static classTo create a UI event. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CustomEvent type.static final StringThe Event type.static final StringThe Event type.protected HashMap<String, DocumentEventSupport.EventFactory> The event factories table.static final StringThe KeyEvent type.static final StringThe KeyEvent type.static final StringThe MouseEvent type.static final StringThe MouseEvent type.static final StringThe MutationEvent type.static final StringThe MutationEvent type.static final StringThe MutationNameEvent type.static final StringThe TextEvent type.static final StringThe UIEvent type.static final StringThe UIEvent type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateEvent(String eventType) Creates a new Event depending on the specified parameter.voidregisterEventFactory(String eventType, DocumentEventSupport.EventFactory factory) Registers a new EventFactory object.
-
Field Details
-
EVENT_TYPE
-
MUTATION_EVENT_TYPE
-
MUTATION_NAME_EVENT_TYPE
-
MOUSE_EVENT_TYPE
-
UI_EVENT_TYPE
-
KEYBOARD_EVENT_TYPE
-
TEXT_EVENT_TYPE
-
CUSTOM_EVENT_TYPE
-
EVENT_DOM2_TYPE
-
MUTATION_EVENT_DOM2_TYPE
-
MOUSE_EVENT_DOM2_TYPE
-
UI_EVENT_DOM2_TYPE
-
KEY_EVENT_DOM2_TYPE
-
eventFactories
The event factories table.
-
-
Constructor Details
-
DocumentEventSupport
public DocumentEventSupport()
-
-
Method Details
-
createEvent
Creates a new Event depending on the specified parameter.- Parameters:
eventType- TheeventTypeparameter specifies the type ofEventinterface to be created. If theEventinterface specified is supported by the implementation this method will return a newEventof the interface type requested. If theEventis to be dispatched via thedispatchEventmethod 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 ofUIEventwould callcreateEventwith the parameter "UIEvent". TheinitUIEventmethod could then be called on the newly createdUIEventto set the specific type of UIEvent to be dispatched and set its context information.ThecreateEventmethod is used in creatingEvents when it is either inconvenient or unnecessary for the user to create anEventthemselves. In cases where the implementation providedEventis insufficient, users may supply their ownEventimplementations for use with thedispatchEventmethod.- Returns:
- The newly created
Event - Throws:
DOMException- NOT_SUPPORTED_ERR: Raised if the implementation does not support the type ofEventinterface requested
-
registerEventFactory
Registers a new EventFactory object.
-