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

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


            // Update times
            updateTimes();

            ListBox lastDropDown = getLastDropDown();
            lastDropDown.addKeyDownHandler(new KeyDownHandler() {
                public void onKeyDown(KeyDownEvent event) {
                    boolean shiftKey = event.getNativeEvent().getShiftKey();
                    if (shiftKey) {
                        return;
                    } else {
View Full Code Here


    afterText = new LabelToolItem();
    afterText.setStyleName("my-paging-text");
    pageText = new TextBox();
    if (GXT.isAriaEnabled()) pageText.setTitle("Page");
    pageText.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
          onPageChange();
        }
      }
View Full Code Here

    afterText = new LabelToolItem();

    pageText = new TextBox();
    pageText.setWidth("30px");
    pageText.addKeyDownHandler(new KeyDownHandler() {
      public void onKeyDown(KeyDownEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
          onPageChange();
        }
      }
View Full Code Here

        @Override
        public void onBlur(BlurEvent arg0) {
          switchMode(VIEW_MODE);
        }
      });
    inputBox.getTextBox().addKeyDownHandler(new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
          if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
            switchMode(VIEW_MODE);
          } else if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
View Full Code Here

        });

    // On key Enter, commit the text and fire a change event.
    // On key Down, revert the text if the user presses escape.
    textArea.addKeyDownHandler(
      new KeyDownHandler() {
        @Override
        public void onKeyDown(KeyDownEvent event) {
          if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
            switchToLabel();
          } else if (event.getNativeKeyCode() == KeyCodes.KEY_ESCAPE) {
View Full Code Here

            // Update times
            updateTimes();

            ListBox lastDropDown = getLastDropDown();
            lastDropDown.addKeyDownHandler(new KeyDownHandler() {
                public void onKeyDown(KeyDownEvent event) {
                    boolean shiftKey = event.getNativeEvent().getShiftKey();
                    if (shiftKey) {
                        return;
                    } else {
View Full Code Here

            super(true, false, true); // autoHide, not modal, dropshadow

            // Delegate popup keyboard events to the relevant handler. The
            // events do not propagate automatically because the popup is
            // directly attached to the RootPanel.
            addDomHandler(new KeyDownHandler() {
                public void onKeyDown(KeyDownEvent event) {
                    if (shortcutActionHandler != null) {
                        shortcutActionHandler.handleKeyboardEvent(Event
                                .as(event.getNativeEvent()));
                    }
View Full Code Here

  /**
   * Initializes the controls of the example.
   */
  private void initControls() {
    // Handle keyboard input
    webGLCanvas.addKeyDownHandler(new KeyDownHandler() {
      @Override
      public void onKeyDown(KeyDownEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_PAGEUP) {
          translateZ += 0.1f;
          event.stopPropagation();
View Full Code Here

  /**
   * Initializes the controls of the example.
   */
  private void initControls() {
    // Handle keyboard input
    webGLCanvas.addKeyDownHandler(new KeyDownHandler() {
      @Override
      public void onKeyDown(KeyDownEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_PAGEUP) {
          translateZ += 0.1f;
          event.stopPropagation();
View Full Code Here

  /**
   * Initializes the controls of the example.
   */
  private void initControls() {
    // Handle keyboard input
    webGLCanvas.addKeyDownHandler(new KeyDownHandler() {
      @Override
      public void onKeyDown(KeyDownEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_PAGEUP) {
          translateZ += 0.1f;
          event.stopPropagation();
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.