1 16 17 package org.apache.xerces.dom.events; 18 19 import org.w3c.dom.Node ; 20 import org.w3c.dom.events.MutationEvent ; 21 22 27 28 public class MutationEventImpl 29 extends org.apache.xerces.dom.events.EventImpl 30 implements MutationEvent 31 { 32 Node relatedNode=null; 33 String prevValue=null,newValue=null,attrName=null; 34 public short attrChange; 37 38 public static final String DOM_SUBTREE_MODIFIED = "DOMSubtreeModified"; 40 public static final String DOM_NODE_INSERTED = "DOMNodeInserted"; 41 public static final String DOM_NODE_REMOVED = "DOMNodeRemoved"; 42 public static final String DOM_NODE_REMOVED_FROM_DOCUMENT = "DOMNodeRemovedFromDocument"; 43 public static final String DOM_NODE_INSERTED_INTO_DOCUMENT = "DOMNodeInsertedIntoDocument"; 44 public static final String DOM_ATTR_MODIFIED = "DOMAttrModified"; 45 public static final String DOM_CHARACTER_DATA_MODIFIED = "DOMCharacterDataModified"; 46 47 51 public String getAttrName() 52 { 53 return attrName; 54 } 55 56 61 public short getAttrChange() 62 { 63 return attrChange; 64 } 65 66 70 public String getNewValue() 71 { 72 return newValue; 73 } 74 75 79 public String getPrevValue() 80 { 81 return prevValue; 82 } 83 84 89 public Node getRelatedNode() 90 { 91 return relatedNode; 92 } 93 94 97 public void initMutationEvent(String typeArg, boolean canBubbleArg, 98 boolean cancelableArg, Node relatedNodeArg, String prevValueArg, 99 String newValueArg, String attrNameArg, short attrChangeArg) 100 { 101 relatedNode=relatedNodeArg; 102 prevValue=prevValueArg; 103 newValue=newValueArg; 104 attrName=attrNameArg; 105 attrChange=attrChangeArg; 106 super.initEvent(typeArg,canBubbleArg,cancelableArg); 107 } 108 109 } 110 | Popular Tags |