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.Widget;
49
50
51
52
53
54
55 public class ClickablePanel extends FocusPanel implements HasAllMouseHandlers, HasClickHandlers, HasAllKeyHandlers, HasAllFocusHandlers{
56
57 public ClickablePanel(Widget child){
58 this();
59 setWidget(child);
60 }
61
62 public ClickablePanel() {
63 super();
64 }
65
66 public HandlerRegistration addClickHandler(ClickHandler handler) {
67 return addDomHandler(handler, ClickEvent.getType());
68 }
69
70 public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) {
71 return addDomHandler(handler, KeyDownEvent.getType());
72 }
73
74 public HandlerRegistration addKeyPressHandler(KeyPressHandler handler) {
75 return addDomHandler(handler, KeyPressEvent.getType());
76 }
77
78 public HandlerRegistration addKeyUpHandler(KeyUpHandler handler) {
79 return addDomHandler(handler, KeyUpEvent.getType());
80 }
81
82 public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) {
83 return addDomHandler(handler, MouseDownEvent.getType());
84 }
85
86 public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler) {
87 return addDomHandler(handler, MouseMoveEvent.getType());
88 }
89
90 public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
91 return addDomHandler(handler, MouseOutEvent.getType());
92 }
93
94 public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
95 return addDomHandler(handler, MouseOverEvent.getType());
96 }
97
98 public HandlerRegistration addMouseUpHandler(MouseUpHandler handler) {
99 return addDomHandler(handler, MouseUpEvent.getType());
100 }
101
102 public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler) {
103 return addDomHandler(handler, MouseWheelEvent.getType());
104 }
105
106 public HandlerRegistration addFocusHandler(FocusHandler handler) {
107 return addDomHandler(handler, FocusEvent.getType());
108 }
109
110 public HandlerRegistration addBlurHandler(BlurHandler handler) {
111 return addDomHandler(handler, BlurEvent.getType());
112 }
113
114 }