aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/esieequest/view/web/WebInterface.java19
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;
6import com.google.gwt.event.dom.client.KeyCodes; 6import com.google.gwt.event.dom.client.KeyCodes;
7import com.google.gwt.event.dom.client.KeyDownEvent; 7import com.google.gwt.event.dom.client.KeyDownEvent;
8import com.google.gwt.event.dom.client.KeyDownHandler; 8import com.google.gwt.event.dom.client.KeyDownHandler;
9import com.google.gwt.event.dom.client.KeyPressEvent;
10import com.google.gwt.event.dom.client.KeyPressHandler;
11import com.google.gwt.event.dom.client.KeyUpEvent;
12import com.google.gwt.event.dom.client.KeyUpHandler;
9import com.google.gwt.uibinder.client.UiBinder; 13import com.google.gwt.uibinder.client.UiBinder;
10import com.google.gwt.uibinder.client.UiField; 14import com.google.gwt.uibinder.client.UiField;
15import com.google.gwt.user.client.Event;
16import com.google.gwt.user.client.Event.NativePreviewEvent;
17import com.google.gwt.user.client.Event.NativePreviewHandler;
11import com.google.gwt.user.client.ui.Button; 18import com.google.gwt.user.client.ui.Button;
12import com.google.gwt.user.client.ui.Composite; 19import com.google.gwt.user.client.ui.Composite;
13import com.google.gwt.user.client.ui.Frame; 20import 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() {