Package com.google.gwt.event.dom.client

Examples of com.google.gwt.event.dom.client.KeyDownHandler


      if (elem != null) {
        setElement(elem);
      }

      elementToCell.put(this);
      addDomHandler(new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
          if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER ||
             event.getNativeKeyCode() == ' ') {
            if (isActive(Cell.this)) {
View Full Code Here


    addDependentTest(Event.ONFOCUS, "focus");
    addDependentTest(Event.ONBLUR, "blur");
    addDependentTest(Event.ONCHANGE, "change");

    // Add event handlers
    textBox.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent event) {

        event.isAltKeyDown();
        event.isControlKeyDown();
        event.isShiftKeyDown();
View Full Code Here

        start.removeStyleName("user-modified");
      }
    });

    final TextBox startText = start.getTextBox();
    startText.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent e) {
        if (e.isRightArrow()
            && start.getCursorPos() == startText.getText().length()) {
          start.hideDatePicker();
          end.setFocus(true);
        }
      }
    });

    end.getTextBox().addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent e) {
        if ((e.isLeftArrow()) && end.getCursorPos() == 0) {
          end.hideDatePicker();
          start.setFocus(true);
        }
View Full Code Here

      findTextBox_.setIconVisible(true);
      findTextBox_.setOverrideWidth(120);
      findTextBox_.getElement().getStyle().setMarginRight(6, Unit.PX);
      toolbar.addRightWidget(findTextBox_);
     
      findTextBox_.addKeyDownHandler(new KeyDownHandler() {
         @Override
         public void onKeyDown(KeyDownEvent event)
         {
            // enter key triggers a find
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
View Full Code Here

      findTextBox_.setIconVisible(true);
      findTextBox_.setOverrideWidth(120);
      findTextBox_.getElement().getStyle().setMarginRight(6, Unit.PX);
      toolbar.addRightWidget(findTextBox_);
     
      findTextBox_.addKeyDownHandler(new KeyDownHandler() {
         @Override
         public void onKeyDown(KeyDownEvent event)
         {
            // enter key triggers a find
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
View Full Code Here

               fireSelectionCommittedEvent();
            }
         }
         private final DoubleClickState doubleClick_ = new DoubleClickState();
      });
      errorTable_.addKeyDownHandler(new KeyDownHandler()
      {
         @Override
         public void onKeyDown(KeyDownEvent event)
         {
            if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER)
View Full Code Here

              display_.getSuggestionDisplay().hideSuggestions();
           }
        }    
     });
    
     searchDisplay.addKeyDownHandler(new KeyDownHandler() {

        @Override
        public void onKeyDown(KeyDownEvent event)
        {
           // eat key-up if the suggestions are showing (since the
View Full Code Here

                                     null,
                                     docDisplay_.asWidget(),
                                     null);
      panel_.setSize("100%", "100%");
     
      releaseOnDismiss_.add(docDisplay_.addKeyDownHandler(new KeyDownHandler()
      {
         public void onKeyDown(KeyDownEvent event)
         {
            NativeEvent ne = event.getNativeEvent();
            int mod = KeyboardShortcut.getModifierValue(ne);
View Full Code Here

   @Override
   protected void onLoad()
   {
      super.onLoad();
      addKeyDownHandler(new KeyDownHandler()
      {
         @Override
         public void onKeyDown(KeyDownEvent event)
         {
            if (event.getNativeKeyCode() == KeyCodes.KEY_DOWN &&
View Full Code Here

   */
  public void testKeyDownEvent() {
    final int[] eventFireCount = {0};
    SuggestBox box = new SuggestBox();
    RootPanel.get().add(box);
    box.addKeyDownHandler(new KeyDownHandler() {
      @Override
      public void onKeyDown(KeyDownEvent event) {
        eventFireCount[0]++;
      }
    });
View Full Code Here

TOP

Related Classes of com.google.gwt.event.dom.client.KeyDownHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.