1 57 package org.xquark.xpath.datamodel.xerces.dom.events; 58 59 import org.w3c.dom.events.Event ; 60 import org.w3c.dom.events.EventTarget ; 61 62 69 public class EventImpl implements Event 70 { 71 public String type=null; 72 public EventTarget target; 73 public EventTarget currentTarget; 74 public short eventPhase; 75 public boolean initialized=false, bubbles=true, cancelable=false; 76 public boolean stopPropagation=false, preventDefault=false; 77 78 protected long timeStamp = System.currentTimeMillis(); 79 80 89 public void initEvent(String eventTypeArg, boolean canBubbleArg, 90 boolean cancelableArg) 91 { 92 type=eventTypeArg; 93 bubbles=canBubbleArg; 94 cancelable=cancelableArg; 95 96 initialized=true; 97 } 98 99 102 public boolean getBubbles() 103 { 104 return bubbles; 105 } 106 107 111 public boolean getCancelable() 112 { 113 return cancelable; 114 } 115 116 119 public EventTarget getCurrentTarget() 120 { 121 return currentTarget; 122 } 123 124 127 public short getEventPhase() 128 { 129 return eventPhase; 130 } 131 132 135 public EventTarget getTarget() 136 { 137 return target; 138 } 139 140 142 public String getType() 143 { 144 return type; 145 } 146 147 public long getTimeStamp() { 148 return timeStamp; 149 } 150 151 155 public void stopPropagation() 156 { 157 stopPropagation=true; 158 } 159 160 163 public void preventDefault() 164 { 165 preventDefault=true; 166 } 167 168 } 169 | Popular Tags |