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

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


            mapOfItemPrices.put(new Integer(itemId), labelPrice);
            //Save numberOfBids Label to be used when new bids are processed.
            mapOfNumberOfBids.put(new Integer(itemId), labelNumberOfBids);

            //Handle ENTER key
            txtBoxMyBid.addKeyboardListener(new KeyboardListener() {

                public void onKeyUp(Widget sender, char keyCode, int modifiers) {
                    if (keyCode == '\r') {
                        sendNewBid(item, txtBoxMyBid, labelMessage);
                    }
View Full Code Here


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

    box.addKeyboardListener(new KeyboardListener() {

      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        handlers.fire(new KeyDownEvent(DOM.eventGetCurrentEvent(), DateBox.this));

        switch (keyCode) {
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

  }
 
 
  private TextBox createTextBox(final Map<String,RegisteredOntologyInfo> suggestions, final ListBox listBox, final MyDialog popup) {
    final TextBox textBox = new TextBox();
    KeyboardListener kb = new KeyboardListenerAdapter() {
      String[] lastEntered = {""};
      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        String enteredText = textBox.getText().trim();
        if ( keyCode == KeyboardListener.KEY_ENTER ) {
          Orr.log("ENTER: '" + enteredText + "'");
View Full Code Here

      container.add(createForm());
     
      statusLabel.setHeight("20px");
     
      KeyboardListener kl = new KeyboardListenerAdapter() {
        @Override
      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
          statusLabel.setText("");
          if ( keyCode == KeyboardListener.KEY_ENTER ) {
            _cancelKey();
View Full Code Here

        statusEditor.setText(statusLabel.getText());
      }
     
    });
   
    statusEditor.addKeyboardListener(new KeyboardListener()
    {

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

     
      statusLabel.setHeight("20px");
      DOM.setElementAttribute(resetPasswordButton.getElement(), "id", "my-button-id");
      DOM.setElementAttribute(createAccountButton.getElement(), "id", "my-button-id");
     
      KeyboardListener kl = new KeyboardListenerAdapter() {
        @Override
      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
          statusLabel.setText("");
          if ( keyCode == KeyboardListener.KEY_ENTER ) {
            userName.cancelKey();
View Full Code Here

  }
 
  public void onModuleLoad() {
    final TextBox txtSend = new TextBox();
    txtSend.setWidth("100%");
    txtSend.addKeyboardListener(new KeyboardListener() {
      public void onKeyUp(Widget sender, char keyCode, int modifiers) {
        if(keyCode == '\r') {
          svc.sendChat(txtSend.getText(), new TrapCallback<Object>() {
            public void success(Object result) {}
          });
View Full Code Here

    }

    public TextBox getTextBox() {

        final TextBox box = new BoundTextBox( constraint );
        box.addKeyboardListener( new KeyboardListener() {

            public void onKeyDown(Widget arg0,
                                  char arg1,
                                  int arg2) {
View Full Code Here

          requestString = param.getApplication().getAnalyzer().getRequestString();
          updateParamName(parameterName.getText());
          param.getApplication().getAnalyzer().setRequestString(requestString);
        }
      });   
      parameterName.addKeyboardListener(new KeyboardListener() {
        public void onKeyDown(Widget sender, char keyCode, int modifiers) {              
        }
 
        public void onKeyPress(Widget sender, char keyCode, int modifiers) {              
        }
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.