1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package com.googlecode.mgwt.dom.client.event.tap;
17
18 import com.google.gwt.dom.client.Element;
19 import com.google.gwt.event.shared.GwtEvent;
20
21
22
23
24
25
26
27
28
29 public class TapEvent extends GwtEvent<TapHandler> {
30
31 private static final Type<TapHandler> TYPE = new Type<TapHandler>();
32 private final int startX;
33 private final int startY;
34 private final Element targetElement;
35
36
37
38
39 @Deprecated
40 public TapEvent(Object source, int startX, int startY) {
41 this(source, null, startX, startY);
42 }
43
44 public TapEvent(Object source, Element targetElement, int startX, int startY) {
45 this.targetElement = targetElement;
46 this.startX = startX;
47 this.startY = startY;
48 setSource(source);
49 }
50
51
52
53
54
55 @Override
56 public com.google.gwt.event.shared.GwtEvent.Type<TapHandler> getAssociatedType() {
57 return TYPE;
58 }
59
60
61
62
63
64 @Override
65 protected void dispatch(TapHandler handler) {
66 handler.onTap(this);
67
68 }
69
70 public static Type<TapHandler> getType() {
71 return TYPE;
72 }
73
74
75
76
77
78
79 public int getStartX() {
80 return startX;
81 }
82
83
84
85
86
87
88 public int getStartY() {
89 return startY;
90 }
91
92
93
94
95 public Element getTargetElement() {
96 return targetElement;
97 }
98
99 }