Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.KeyboardListenerAdapter


        onChange();
        setFocus(true);
      }
    });

    addKeyboardListener(new KeyboardListenerAdapter() {
      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        task.delay(delay);
      }
    });
  }
View Full Code Here


    beforePage.setStyleName("my-paging-text");
    afterText = new Label();
    afterText.setStyleName("my-paging-text");
    pageText = new TextBox();
    if (!GXT.isGecko && !GXT.isSafari) {
      pageText.addKeyboardListener(new KeyboardListenerAdapter() {
        public void onKeyDown(Widget sender, char keyCode, int modifiers) {
          if (keyCode == KeyboardListener.KEY_ENTER) {
            onPageChange();
          }
        }
View Full Code Here

      public void onLostFocus(Widget sender) {
        amountBox.setText(reformatContent());
      }
    });

    amountBox.addKeyboardListener(new KeyboardListenerAdapter() {
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        if (keyCode == (char) KEY_ENTER) {
          amountBox.setText(reformatContent());
        }
      }
View Full Code Here

    beforePage.setStyleName("my-paging-text");
    afterText = new Label();
    afterText.setStyleName("my-paging-text");
    pageText = new TextBox();
    if (!GXT.isGecko && !GXT.isSafari) {
      pageText.addKeyboardListener(new KeyboardListenerAdapter() {
        public void onKeyDown(Widget sender, char keyCode, int modifiers) {
          if (keyCode == KeyboardListener.KEY_ENTER) {
            onPageChange();
          }
        }
View Full Code Here

        // Create the TextBox element used for non word wrapped Labels
        // and add a KeyboardListener for Return and Esc key presses
        changeText = new TextBox();
        changeText.setStyleName("editableLabel-textBox");

        changeText.addKeyboardListener(new KeyboardListenerAdapter()
        {
            public void onKeyPress (Widget sender, char keyCode, int modifiers)
            {
                // If return then save, if Esc cancel the change, otherwise do nothing
                switch (keyCode) {
                    case 13:
                        setTextLabel();
                        break;
                    case 27:
                        cancelLabelChange();
                        break;
                }
            }
        });

        // Create the TextAre element used for word-wrapped Labels
        // and add a KeyboardListener for Esc key presses (not return in this case)

        changeTextArea = new TextArea();
        changeTextArea.setStyleName("editableLabel-textArea");
       
        changeTextArea.addKeyboardListener(new KeyboardListenerAdapter()
        {
            public void onKeyPress (Widget sender, char keyCode, int modifiers)
            {
                // If Esc then cancel the change, otherwise do nothing
                switch (keyCode) {
View Full Code Here

public class CalcKeyboardListener extends KeyboardListenerAdapter
{

    public CalcKeyboardListener (final CalcEngine calc, final TextBoxBase textBox)
    {
        textBox.addKeyboardListener(new KeyboardListenerAdapter()
        {
            public void onKeyPress (Widget sender, char keyCode, int modifiers)
            {

                if (keyCode >= 48 && keyCode <= 57) {
View Full Code Here

                data.content = text.getText();
                makeDirty();
            }
        } );

        text.addKeyboardListener( new KeyboardListenerAdapter() {
            public void onKeyDown(Widget arg0,
                                  char arg1,
                                  int arg2) {
                if ( arg1 == ' ' && arg2 == MODIFIER_CTRL ) {
                    showInTextOptions();
View Full Code Here

                data.content = text.getText();
                makeDirty();
            }
        } );

        text.addKeyboardListener( new KeyboardListenerAdapter() {
            public void onKeyDown(Widget arg0,
                                  char arg1,
                                  int arg2) {

                if ( arg1 == KEY_TAB ) {
View Full Code Here

            drop.setSelectedIndex(i);
          }
            }

    }
    drop.addKeyboardListener(new KeyboardListenerAdapter() {
      public void onKeyUp(Widget sender, char keyCode,
          int modifiers) {
        if (keyCode == KeyboardListener.KEY_ENTER) {
          r.set(dataIdx, drop.getValue(drop.getSelectedIndex()));
          w.destroy();
View Full Code Here

    w.setPlain(true);
    w.setBodyBorder(false);
    w.setTitle(dta);
    final TextBox box = new TextBox();
    box.setText(val);
    box.addKeyboardListener(new KeyboardListenerAdapter() {
      public void onKeyUp(Widget sender, char keyCode,
          int modifiers) {
        if (keyCode == KeyboardListener.KEY_ENTER) {
          r.set(dta, box.getText());
          w.destroy();
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.KeyboardListenerAdapter

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.