1 57 package com.sun.org.apache.xerces.internal.dom.events; 58 59 import org.w3c.dom.events.Event ; 60 import org.w3c.dom.events.EventTarget ; 61 62 69 72 public class EventImpl implements Event 73 { 74 public String type=null; 75 public EventTarget target; 76 public EventTarget currentTarget; 77 public short eventPhase; 78 public boolean initialized=false, bubbles=true, cancelable=false; 79 public boolean stopPropagation=false, preventDefault=false; 80 81 protected long timeStamp = System.currentTimeMillis(); 82 83 92 public void initEvent(String eventTypeArg, boolean canBubbleArg, 93 boolean cancelableArg) 94 { 95 type=eventTypeArg; 96 bubbles=canBubbleArg; 97 cancelable=cancelableArg; 98 99 initialized=true; 100 } 101 102 105 public boolean getBubbles() 106 { 107 return bubbles; 108 } 109 110 114 public boolean getCancelable() 115 { 116 return cancelable; 117 } 118 119 122 public EventTarget getCurrentTarget() 123 { 124 return currentTarget; 125 } 126 127 130 public short getEventPhase() 131 { 132 return eventPhase; 133 } 134 135 138 public EventTarget getTarget() 139 { 140 return target; 141 } 142 143 145 public String getType() 146 { 147 return type; 148 } 149 150 public long getTimeStamp() { 151 return timeStamp; 152 } 153 154 158 public void stopPropagation() 159 { 160 stopPropagation=true; 161 } 162 163 166 public void preventDefault() 167 { 168 preventDefault=true; 169 } 170 171 } 172 | Popular Tags |