diff options
-rw-r--r-- | src/esieequest/view/web/WebInterface.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/esieequest/view/web/WebInterface.java b/src/esieequest/view/web/WebInterface.java index 221eea9..f1abe9d 100644 --- a/src/esieequest/view/web/WebInterface.java +++ b/src/esieequest/view/web/WebInterface.java | |||
@@ -6,8 +6,15 @@ import com.google.gwt.event.dom.client.ClickHandler; | |||
6 | import com.google.gwt.event.dom.client.KeyCodes; | 6 | import com.google.gwt.event.dom.client.KeyCodes; |
7 | import com.google.gwt.event.dom.client.KeyDownEvent; | 7 | import com.google.gwt.event.dom.client.KeyDownEvent; |
8 | import com.google.gwt.event.dom.client.KeyDownHandler; | 8 | import com.google.gwt.event.dom.client.KeyDownHandler; |
9 | import com.google.gwt.event.dom.client.KeyPressEvent; | ||
10 | import com.google.gwt.event.dom.client.KeyPressHandler; | ||
11 | import com.google.gwt.event.dom.client.KeyUpEvent; | ||
12 | import com.google.gwt.event.dom.client.KeyUpHandler; | ||
9 | import com.google.gwt.uibinder.client.UiBinder; | 13 | import com.google.gwt.uibinder.client.UiBinder; |
10 | import com.google.gwt.uibinder.client.UiField; | 14 | import com.google.gwt.uibinder.client.UiField; |
15 | import com.google.gwt.user.client.Event; | ||
16 | import com.google.gwt.user.client.Event.NativePreviewEvent; | ||
17 | import com.google.gwt.user.client.Event.NativePreviewHandler; | ||
11 | import com.google.gwt.user.client.ui.Button; | 18 | import com.google.gwt.user.client.ui.Button; |
12 | import com.google.gwt.user.client.ui.Composite; | 19 | import com.google.gwt.user.client.ui.Composite; |
13 | import com.google.gwt.user.client.ui.Frame; | 20 | import com.google.gwt.user.client.ui.Frame; |
@@ -77,6 +84,7 @@ class WebInterface extends Composite implements View { | |||
77 | public WebInterface() { | 84 | public WebInterface() { |
78 | this.initWidget(WebInterface.uiBinder.createAndBindUi(this)); | 85 | this.initWidget(WebInterface.uiBinder.createAndBindUi(this)); |
79 | this.bindInputField(); | 86 | this.bindInputField(); |
87 | this.bindKeys(); | ||
80 | this.bindButtons(); | 88 | this.bindButtons(); |
81 | } | 89 | } |
82 | 90 | ||
@@ -126,6 +134,17 @@ class WebInterface extends Composite implements View { | |||
126 | } | 134 | } |
127 | 135 | ||
128 | /** | 136 | /** |
137 | * Binds keys | ||
138 | */ | ||
139 | private void bindKeys() { | ||
140 | Event.addNativePreviewHandler(new NativePreviewHandler() { | ||
141 | public void onPreviewNativeEvent(NativePreviewEvent event) { | ||
142 | int key = event.getNativeEvent().getKeyCode(); | ||
143 | } | ||
144 | }); | ||
145 | } | ||
146 | |||
147 | /** | ||
129 | * Binds the buttons to send a defined command to the controller. | 148 | * Binds the buttons to send a defined command to the controller. |
130 | */ | 149 | */ |
131 | private void bindButtons() { | 150 | private void bindButtons() { |