Package org.w3c.dom.events

Examples of org.w3c.dom.events.DocumentEvent.createEvent()


                (Element)context.getFocusManager().getCurrentEventTarget();
            if (targetElement == null) {
                return;
            }
            DocumentEvent d = (DocumentEvent)targetElement.getOwnerDocument();
            DOMKeyEvent keyEvt = (DOMKeyEvent)d.createEvent("KeyEvents");
            keyEvt.initKeyEvent(eventType,
                                true,
                                true,
                                evt.isControlDown(),
                                evt.isAltDown(),
View Full Code Here


            */
            short button = getButton(evt);
            Point screenXY = evt.getScreenPoint();
            // create the coresponding DOM MouseEvent
            DocumentEvent d = (DocumentEvent)targetElement.getOwnerDocument();
            MouseEvent mouseEvt = (MouseEvent)d.createEvent("MouseEvents");
            mouseEvt.initMouseEvent(eventType,
                                    true,
                                    cancelable,
                                    null,
                                    evt.getClickCount(),
View Full Code Here

            }
        }

        Event ev;
        DocumentEvent de = (DocumentEvent)elt.getOwnerDocument();
        ev = de.createEvent("SVGEvents");
        ev.initEvent("SVGLoad", false, false);
        EventTarget t = (EventTarget)elt;

        final String s =
            elt.getAttributeNS(null, SVGConstants.SVG_ONLOAD_ATTRIBUTE);
View Full Code Here

            (SVGSVGElement)document.getDocumentElement();
        // Event is dispatched on outermost SVG element.
        EventTarget t = root;

        DocumentEvent de = (DocumentEvent)document;
        Event ev = de.createEvent("SVGEvents");
        ev.initEvent(eventType, false, false);
        t.dispatchEvent(ev);
    }

    /**
 
View Full Code Here

            attrRemoved(node, oldv);
        }
  AbstractDocument doc = getCurrentDocument();
  if (doc.getEventsEnabled() && !oldv.equals(newv)) {
      DocumentEvent de = (DocumentEvent)doc;
      MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents");
      ev.initMutationEvent("DOMAttrModified",
         true,    // canBubbleArg
         false,   // cancelableArg
         node,    // relatedNodeArg
         oldv,    // prevValueArg
View Full Code Here

     */
    public void fireDOMNodeInsertedIntoDocumentEvent() {
        AbstractDocument doc = getCurrentDocument();
        if (doc.getEventsEnabled()) {
            DocumentEvent de = (DocumentEvent)doc;
            MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents");
            ev.initMutationEvent("DOMNodeInsertedIntoDocument",
                                 true,   // canBubbleArg
                                 false,  // cancelableArg
                                 null,   // relatedNodeArg
                                 null,   // prevValueArg
View Full Code Here

     */
    public void fireDOMNodeRemovedFromDocumentEvent() {
        AbstractDocument doc = getCurrentDocument();
        if (doc.getEventsEnabled()) {
            DocumentEvent de = (DocumentEvent)doc;
            MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents");
            ev.initMutationEvent("DOMNodeRemovedFromDocument",
                                 true,   // canBubbleArg
                                 false,  // cancelableArg
                                 null,   // relatedNodeArg
                                 null,   // prevValueArg
View Full Code Here

    protected void fireDOMCharacterDataModifiedEvent(String oldv,
                                                     String newv) {
        AbstractDocument doc = getCurrentDocument();
        if (doc.getEventsEnabled()) {
            DocumentEvent de = (DocumentEvent)doc;
            MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents");
            ev.initMutationEvent("DOMCharacterDataModified",
                                 true,  // canBubbleArg
                                 false, // cancelableArg
                                 null,  // relatedNodeArg
                                 oldv,  // prevValueArg
View Full Code Here

     */
    protected void fireDOMSubtreeModifiedEvent() {
  AbstractDocument doc = getCurrentDocument();
  if (doc.getEventsEnabled()) {
      DocumentEvent de = (DocumentEvent)doc;
      MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents");
      ev.initMutationEvent("DOMSubtreeModified",
         true,   // canBubbleArg
         false,  // cancelableArg
         null,   // relatedNodeArg
         null,   // prevValueArg
View Full Code Here

     */
    protected void fireDOMNodeInsertedEvent(Node node) {
  AbstractDocument doc = getCurrentDocument();
  if (doc.getEventsEnabled()) {
      DocumentEvent de = (DocumentEvent)doc;
      MutationEvent ev = (MutationEvent)de.createEvent("MutationEvents");
      ev.initMutationEvent("DOMNodeInserted",
         true,   // canBubbleArg
         false,  // cancelableArg
         this,   // relatedNodeArg
         null,   // prevValueArg
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.