예제 #1
0
파일: Shell.java 프로젝트: jmhome/rstudio
 public void onKeyPress(KeyPressEvent event) {
   for (KeyPressPreviewHandler handler : keyPressPreviewHandlers_) {
     if (handler.previewKeyPress(event.getCharCode())) {
       event.preventDefault();
       event.stopPropagation();
       return;
     }
   }
 }
예제 #2
0
 @UiHandler("message")
 void onMessageKey(KeyPressEvent event) {
   if ((event.getCharCode() == '\n' || event.getCharCode() == KeyCodes.KEY_ENTER)
       && event.isControlKeyDown()) {
     event.preventDefault();
     event.stopPropagation();
     onSend(null);
   }
 }
예제 #3
0
파일: SearchBar.java 프로젝트: galderz/rhq
    public void onKeyPress(KeyPressEvent event) {
      // hide pattern field/label, turn off star
      if (event.getCharCode() == KeyCodes.KEY_ENTER) {
        return;
      }

      patternNameLabel.setText("");
      patternNameLabel.setVisible(false);
      patternNameField.setValue("", true);
      patternNameField.setVisible(false);
      currentSearchId = 0;
      starImage.setUrl(STAR_OFF_URL);

      if (event.getCharCode() == KeyCodes.KEY_ESCAPE) {
        autoCompletePatternField.hideSuggestionList();
        event.preventDefault();
        event.stopPropagation();
      }
    }