Class DocumentEventSupport


  • public class DocumentEventSupport
    extends java.lang.Object
    This class implements the behavior of DocumentEvent.
    • 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
    • Constructor Detail

      • DocumentEventSupport

        public DocumentEventSupport()
    • Method Detail

      • createEvent

        public org.w3c.dom.events.Event createEvent​(java.lang.String eventType)
                                             throws org.w3c.dom.DOMException
        Creates a new Event depending on the specified parameter.
        Parameters:
        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 Events 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.
        Returns:
        The newly created Event
        Throws:
        org.w3c.dom.DOMException - NOT_SUPPORTED_ERR: Raised if the implementation does not support the type of Event interface requested
      • registerEventFactory

        public void registerEventFactory​(java.lang.String eventType,
                                         DocumentEventSupport.EventFactory factory)
        Registers a new EventFactory object.