Пример #1
0
 public void onKeyPress(KeyPressEvent event) {
   for (KeyPressPreviewHandler handler : keyPressPreviewHandlers_) {
     if (handler.previewKeyPress(event.getCharCode())) {
       event.preventDefault();
       event.stopPropagation();
       return;
     }
   }
 }
Пример #2
0
 @Override
 public HandlerRegistration addKeyPressHandler(final KeyPressHandler handler) {
   return handlers.addHandler(KeyPressEvent.getType(), handler);
 }
Пример #3
0
 public HandlerRegistration addKeyPressHandler(KeyPressHandler handler) {
   return addDomHandler(handler, KeyPressEvent.getType());
 }