Package org.apache.batik.dom.events
Class DocumentEventSupport
- java.lang.Object
-
- org.apache.batik.dom.events.DocumentEventSupport
-
public class DocumentEventSupport extends java.lang.ObjectThis class implements the behavior of DocumentEvent.- Version:
- $Id: DocumentEventSupport.java 1813521 2017-10-27 12:34:11Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDocumentEventSupport.CustomEventFactoryTo create a Custom event.static interfaceDocumentEventSupport.EventFactoryThis interface represents an event factory.protected static classDocumentEventSupport.KeyboardEventFactoryTo create a keyboard event.protected static classDocumentEventSupport.KeyEventFactoryTo create a key event.protected static classDocumentEventSupport.MouseEventFactoryTo create a mouse event.protected static classDocumentEventSupport.MutationEventFactoryTo create a mutation event.protected static classDocumentEventSupport.MutationNameEventFactoryTo create a mutation name event.protected static classDocumentEventSupport.SimpleEventFactoryTo create a simple event.protected static classDocumentEventSupport.TextEventFactoryTo create a Text event.protected static classDocumentEventSupport.UIEventFactoryTo create a UI event.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCUSTOM_EVENT_TYPEThe CustomEvent type.static java.lang.StringEVENT_DOM2_TYPEThe Event type.static java.lang.StringEVENT_TYPEThe Event type.protected java.util.HashMap<java.lang.String,DocumentEventSupport.EventFactory>eventFactoriesThe event factories table.static java.lang.StringKEY_EVENT_DOM2_TYPEThe KeyEvent type.static java.lang.StringKEYBOARD_EVENT_TYPEThe KeyEvent type.static java.lang.StringMOUSE_EVENT_DOM2_TYPEThe MouseEvent type.static java.lang.StringMOUSE_EVENT_TYPEThe MouseEvent type.static java.lang.StringMUTATION_EVENT_DOM2_TYPEThe MutationEvent type.static java.lang.StringMUTATION_EVENT_TYPEThe MutationEvent type.static java.lang.StringMUTATION_NAME_EVENT_TYPEThe MutationNameEvent type.static java.lang.StringTEXT_EVENT_TYPEThe TextEvent type.static java.lang.StringUI_EVENT_DOM2_TYPEThe UIEvent type.static java.lang.StringUI_EVENT_TYPEThe UIEvent type.
-
Constructor Summary
Constructors Constructor Description DocumentEventSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.events.EventcreateEvent(java.lang.String eventType)Creates a new Event depending on the specified parameter.voidregisterEventFactory(java.lang.String eventType, DocumentEventSupport.EventFactory factory)Registers a new EventFactory object.
-
-
-
Field Detail
-
EVENT_TYPE
public static final java.lang.String EVENT_TYPE
The Event type.- See Also:
- Constant Field Values
-
MUTATION_EVENT_TYPE
public static final java.lang.String MUTATION_EVENT_TYPE
The MutationEvent type.- See Also:
- Constant Field Values
-
MUTATION_NAME_EVENT_TYPE
public static final java.lang.String MUTATION_NAME_EVENT_TYPE
The MutationNameEvent type.- See Also:
- Constant Field Values
-
MOUSE_EVENT_TYPE
public static final java.lang.String MOUSE_EVENT_TYPE
The MouseEvent type.- See Also:
- Constant Field Values
-
UI_EVENT_TYPE
public static final java.lang.String UI_EVENT_TYPE
The UIEvent type.- See Also:
- Constant Field Values
-
KEYBOARD_EVENT_TYPE
public static final java.lang.String KEYBOARD_EVENT_TYPE
The KeyEvent type.- See Also:
- Constant Field Values
-
TEXT_EVENT_TYPE
public static final java.lang.String TEXT_EVENT_TYPE
The TextEvent type.- See Also:
- Constant Field Values
-
CUSTOM_EVENT_TYPE
public static final java.lang.String CUSTOM_EVENT_TYPE
The CustomEvent type.- See Also:
- Constant Field Values
-
EVENT_DOM2_TYPE
public static final java.lang.String EVENT_DOM2_TYPE
The Event type.- See Also:
- Constant Field Values
-
MUTATION_EVENT_DOM2_TYPE
public static final java.lang.String MUTATION_EVENT_DOM2_TYPE
The MutationEvent type.- See Also:
- Constant Field Values
-
MOUSE_EVENT_DOM2_TYPE
public static final java.lang.String MOUSE_EVENT_DOM2_TYPE
The MouseEvent type.- See Also:
- Constant Field Values
-
UI_EVENT_DOM2_TYPE
public static final java.lang.String UI_EVENT_DOM2_TYPE
The UIEvent type.- See Also:
- Constant Field Values
-
KEY_EVENT_DOM2_TYPE
public static final java.lang.String KEY_EVENT_DOM2_TYPE
The KeyEvent type.- See Also:
- Constant Field Values
-
eventFactories
protected java.util.HashMap<java.lang.String,DocumentEventSupport.EventFactory> eventFactories
The event factories table.
-
-
Method Detail
-
createEvent
public org.w3c.dom.events.Event createEvent(java.lang.String eventType) throws org.w3c.dom.DOMExceptionCreates 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:
org.w3c.dom.DOMException- NOT_SUPPORTED_ERR: Raised if the implementation does not support the type ofEventinterface requested
-
registerEventFactory
public void registerEventFactory(java.lang.String eventType, DocumentEventSupport.EventFactory factory)Registers a new EventFactory object.
-
-