1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.student.common.ui.client.widgets; |
17 | |
|
18 | |
import com.google.gwt.event.dom.client.BlurEvent; |
19 | |
import com.google.gwt.event.dom.client.BlurHandler; |
20 | |
import com.google.gwt.event.dom.client.ClickEvent; |
21 | |
import com.google.gwt.event.dom.client.ClickHandler; |
22 | |
import com.google.gwt.event.dom.client.FocusEvent; |
23 | |
import com.google.gwt.event.dom.client.FocusHandler; |
24 | |
import com.google.gwt.event.dom.client.HasAllFocusHandlers; |
25 | |
import com.google.gwt.event.dom.client.HasAllKeyHandlers; |
26 | |
import com.google.gwt.event.dom.client.HasAllMouseHandlers; |
27 | |
import com.google.gwt.event.dom.client.HasClickHandlers; |
28 | |
import com.google.gwt.event.dom.client.KeyDownEvent; |
29 | |
import com.google.gwt.event.dom.client.KeyDownHandler; |
30 | |
import com.google.gwt.event.dom.client.KeyPressEvent; |
31 | |
import com.google.gwt.event.dom.client.KeyPressHandler; |
32 | |
import com.google.gwt.event.dom.client.KeyUpEvent; |
33 | |
import com.google.gwt.event.dom.client.KeyUpHandler; |
34 | |
import com.google.gwt.event.dom.client.MouseDownEvent; |
35 | |
import com.google.gwt.event.dom.client.MouseDownHandler; |
36 | |
import com.google.gwt.event.dom.client.MouseMoveEvent; |
37 | |
import com.google.gwt.event.dom.client.MouseMoveHandler; |
38 | |
import com.google.gwt.event.dom.client.MouseOutEvent; |
39 | |
import com.google.gwt.event.dom.client.MouseOutHandler; |
40 | |
import com.google.gwt.event.dom.client.MouseOverEvent; |
41 | |
import com.google.gwt.event.dom.client.MouseOverHandler; |
42 | |
import com.google.gwt.event.dom.client.MouseUpEvent; |
43 | |
import com.google.gwt.event.dom.client.MouseUpHandler; |
44 | |
import com.google.gwt.event.dom.client.MouseWheelEvent; |
45 | |
import com.google.gwt.event.dom.client.MouseWheelHandler; |
46 | |
import com.google.gwt.event.shared.HandlerRegistration; |
47 | |
import com.google.gwt.user.client.ui.FocusPanel; |
48 | |
import com.google.gwt.user.client.ui.SimplePanel; |
49 | |
import com.google.gwt.user.client.ui.Widget; |
50 | |
|
51 | |
|
52 | |
|
53 | |
|
54 | |
|
55 | |
|
56 | |
public class ClickablePanel extends FocusPanel implements HasAllMouseHandlers, HasClickHandlers, HasAllKeyHandlers, HasAllFocusHandlers{ |
57 | |
|
58 | |
public ClickablePanel(Widget child){ |
59 | 0 | this(); |
60 | 0 | setWidget(child); |
61 | 0 | } |
62 | |
|
63 | |
public ClickablePanel() { |
64 | 0 | super(); |
65 | 0 | } |
66 | |
|
67 | |
public HandlerRegistration addClickHandler(ClickHandler handler) { |
68 | 0 | return addDomHandler(handler, ClickEvent.getType()); |
69 | |
} |
70 | |
|
71 | |
public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) { |
72 | 0 | return addDomHandler(handler, KeyDownEvent.getType()); |
73 | |
} |
74 | |
|
75 | |
public HandlerRegistration addKeyPressHandler(KeyPressHandler handler) { |
76 | 0 | return addDomHandler(handler, KeyPressEvent.getType()); |
77 | |
} |
78 | |
|
79 | |
public HandlerRegistration addKeyUpHandler(KeyUpHandler handler) { |
80 | 0 | return addDomHandler(handler, KeyUpEvent.getType()); |
81 | |
} |
82 | |
|
83 | |
public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) { |
84 | 0 | return addDomHandler(handler, MouseDownEvent.getType()); |
85 | |
} |
86 | |
|
87 | |
public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler) { |
88 | 0 | return addDomHandler(handler, MouseMoveEvent.getType()); |
89 | |
} |
90 | |
|
91 | |
public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) { |
92 | 0 | return addDomHandler(handler, MouseOutEvent.getType()); |
93 | |
} |
94 | |
|
95 | |
public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) { |
96 | 0 | return addDomHandler(handler, MouseOverEvent.getType()); |
97 | |
} |
98 | |
|
99 | |
public HandlerRegistration addMouseUpHandler(MouseUpHandler handler) { |
100 | 0 | return addDomHandler(handler, MouseUpEvent.getType()); |
101 | |
} |
102 | |
|
103 | |
public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler) { |
104 | 0 | return addDomHandler(handler, MouseWheelEvent.getType()); |
105 | |
} |
106 | |
|
107 | |
public HandlerRegistration addFocusHandler(FocusHandler handler) { |
108 | 0 | return addDomHandler(handler, FocusEvent.getType()); |
109 | |
} |
110 | |
|
111 | |
public HandlerRegistration addBlurHandler(BlurHandler handler) { |
112 | 0 | return addDomHandler(handler, BlurEvent.getType()); |
113 | |
} |
114 | |
|
115 | |
} |