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

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


    requestUriTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        updateReferences();
      }
    });
    requestUriTextBox.addKeyboardListener(new KeyboardListener() {     
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {   
        // empty
      }

      public void onKeyPress(Widget sender, char keyCode, int modifiers) {
View Full Code Here


      final TextBox queryValueTextBox = new TextBox();
      queryValueTextBox.setWidth("10em");
      queryValueTextBox.setText(queryValues[i]);
      // track parameter value changes
      final String currentParameter = queryParameters[i];     
      queryValueTextBox.addKeyboardListener(new KeyboardListener() {
        public void onKeyDown(Widget sender, char keyCode, int modifiers) {
          // empty
        }

        public void onKeyPress(Widget sender, char keyCode, int modifiers) {
View Full Code Here

      }
      newUri += queryParameters[i] + "=" + queryValues[i];      
    }
    newUri += "&" + currentParameter + "=" + currentValue + uri.getFragment();
    updateReferences(requestUriTextBox, newUri);   
    queryParamNameTextBox.addKeyboardListener(new KeyboardListener() {
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        // empty
      }

      public void onKeyPress(Widget sender, char keyCode, int modifiers) {
        // empty
      }

      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        updateParameterName(queryParamNameTextBox.getText(), queryValueTextBox.getText());
      }
    });
    queryParamNameTextBox.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        updateParameterName(queryParamNameTextBox.getText(), queryValueTextBox.getText());
      }
    });
    queryParamNameTextBox.setText(GuiFactory.strings.paramName());
    containerPanel.add(queryParamNameTextBox);
    queryParamNameTextBox.setSelectionRange(0, queryParamNameTextBox.getText().length());     
    HTML parameterName = new HTML("<nobr/> =&nbsp;</nobr>");
    containerPanel.add(parameterName);    
    queryValueTextBox.addKeyboardListener(new KeyboardListener() {
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        // empty
      }

      public void onKeyPress(Widget sender, char keyCode, int modifiers) {
View Full Code Here

        VerticalPanel uptab = new VerticalPanel();
        username = new TextBox();
        username.setName("j_username");
        username.setText(lastNameEntered);

        KeyboardListener enterListener = new KeyboardListenerAdapter() {
            public void onKeyPress(Widget sender, char keyCode,
                    int modifiers) {
                if (keyCode == KEY_ENTER) {
                    form.submit();
                }
View Full Code Here

            }
           
        });
       
        if(updateOnKeypress) {
            this.addKeyboardListener(new KeyboardListener() {
                public void onKeyPress(Widget sender, char keyCode,
                        int modifiers) {
                   
                    changes.firePropertyChange("value", old,
                            getValue() );
                    old = (String) getValue();
                   
                }
               
                public void onKeyDown(Widget sender, char keyCode,
                        int modifiers) {
                }
               
                public void onKeyUp(Widget sender, char keyCode,
                        int modifiers) {
                }
            });
        } else {
            this.addKeyboardListener( new KeyboardListener(){
                public void onKeyUp(Widget sender, char keyCode, int modifiers) {
                }

                public void onKeyPress(Widget sender, char keyCode, int modifiers) {
                    if( keyCode == KeyboardListener.KEY_ENTER ){
View Full Code Here

    public TextArea(final boolean updateOnKeypress) {
        final TextArea instance = this;
        old = base.getText();
       
        if(updateOnKeypress) {
            this.addKeyboardListener(new KeyboardListener() {
                public void onKeyPress(Widget sender, char keyCode,
                        int modifiers) {
                   
                    changes.firePropertyChange("value", old,
                            getValue() );
                    old = (String) getValue();
                   
                }
               
                public void onKeyDown(Widget sender, char keyCode,
                        int modifiers) {
                }
               
                public void onKeyUp(Widget sender, char keyCode,
                        int modifiers) {
                }
            });
        } else {
            this.addKeyboardListener( new KeyboardListener(){
                public void onKeyUp(Widget sender, char keyCode, int modifiers) {
                }

                public void onKeyPress(Widget sender, char keyCode, int modifiers) {
                    if( keyCode == KeyboardListener.KEY_ENTER ){
View Full Code Here

    p.add(b);
    final FastTree tree = new FastTree();
    final HashMap<String, FastTreeItem> treeItems = new HashMap<String, FastTreeItem>();

    b.addKeyboardListener(new KeyboardListener() {

      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        if (keyCode == KEY_ENTER) {
          String value = b.getText().trim();
          FastTreeItem chosen = treeItems.get(value);
View Full Code Here

      public void onClick(Widget sender) {
        showCurrentDate();
      }
    });

    box.addKeyboardListener(new KeyboardListener() {
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        fireEvent(new KeyDownEvent(DOM.eventGetCurrentEvent()));

        switch (keyCode) {
          case KEY_ENTER:
View Full Code Here

          editorGotFocus = true;
          editorLostFocus = false;
          GWT.log("Editor got focus... ", null);
        }
      });
      editor.addKeyboardListener(new KeyboardListener() {
        public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        }
     
        public void onKeyPress(Widget sender, char keyCode, int modifiers) {
        }
View Full Code Here

      }

    });

    searchBox.setWidth("200px");
    searchBox.addKeyboardListener(new KeyboardListener() {

      @Override
      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        if (KeyboardListener.KEY_ENTER == keyCode)
          searchAddress();
View Full Code Here

TOP

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

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.