1 16 package org.apache.xerces.dom.events; 17 18 import org.w3c.dom.events.Event ; 19 import org.w3c.dom.events.EventTarget ; 20 21 33 public class EventImpl implements Event 34 { 35 public String type=null; 36 public EventTarget target; 37 public EventTarget currentTarget; 38 public short eventPhase; 39 public boolean initialized=false, bubbles=true, cancelable=false; 40 public boolean stopPropagation=false, preventDefault=false; 41 42 protected long timeStamp = System.currentTimeMillis(); 43 44 53 public void initEvent(String eventTypeArg, boolean canBubbleArg, 54 boolean cancelableArg) 55 { 56 type=eventTypeArg; 57 bubbles=canBubbleArg; 58 cancelable=cancelableArg; 59 60 initialized=true; 61 } 62 63 66 public boolean getBubbles() 67 { 68 return bubbles; 69 } 70 71 75 public boolean getCancelable() 76 { 77 return cancelable; 78 } 79 80 83 public EventTarget getCurrentTarget() 84 { 85 return currentTarget; 86 } 87 88 91 public short getEventPhase() 92 { 93 return eventPhase; 94 } 95 96 99 public EventTarget getTarget() 100 { 101 return target; 102 } 103 104 106 public String getType() 107 { 108 return type; 109 } 110 111 public long getTimeStamp() { 112 return timeStamp; 113 } 114 115 119 public void stopPropagation() 120 { 121 stopPropagation=true; 122 } 123 124 127 public void preventDefault() 128 { 129 preventDefault=true; 130 } 131 132 } 133 | Popular Tags |