Examples of cancelKey()


Examples of com.google.gwt.user.client.ui.TextArea.cancelKey()

          ta.addKeyboardListener(new KeyboardListenerAdapter() {
            public void onKeyPress(Widget sender, char keyCode, int modifiers) {

              if ( keyCode == KEY_ENTER ) {
                ta.cancelKey();
                contents.setText(ta.getText());
                contents.setSize("100%", "100%");
                RootPanel.get().remove(ta);
                focusPanel.setFocus(true);
                return;
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextArea.cancelKey()

          ta.addKeyboardListener(new KeyboardListenerAdapter() {
            public void onKeyPress(Widget sender, char keyCode, int modifiers) {

              if ( keyCode == KEY_ENTER ) {
                ta.cancelKey();
                valHtml.setText(ta.getText());
                RootPanel.get().remove(ta);
                focusPanel.setFocus(true);
                return;
              }
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextArea.cancelKey()

              String text = ta.getText();
              Orr.log("onKeyPress: keyCode=" +keyCode+ ", modifiers=" +modifiers+ " text=[" +text+ "]");
             
              if ( keyCode == KEY_ENTER || keyCode == KEY_TAB ) {
                if ( keyCode == KEY_ENTER ) {
                  ta.cancelKey();
                }
                contents.setText(text);
                if ( text.length() > 0 ) {
                  contents.setSize("100%", "100%");
                }
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextArea.cancelKey()

                }
                return;
              }
              if ( keyCode == KEY_ESCAPE ) {
                RootPanel.get().remove(ta);
                ta.cancelKey();
                focusPanel.setFocus(true);
                return;
              }
            }
          });
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextBox.cancelKey()

          if (input==dtkHour){
          limit = 23; }else{ limit = 59; }
         
          // ci stiamo allargando troppo, elimina il carattere!
          if (Integer.parseInt(input.getText()+carattere) > limit) {
          input.cancelKey(); }
          // se il testo inizia per '0' e contiene altri 2 caratteri allora eliminalo!
          if (input.getText().startsWith("0")){
          if (input.getText().length()==2){
          input.setText(Integer.toString(Integer.parseInt(input.getText())));}}
        }
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextBox.cancelKey()

        // Il carattere inserito non � un numero? Eliminalo!
           
        // il controllo per il Backspace non pu� avvenire assieme a
        // quello del formato del carattere
        if(carattere != (char) KeyCodes.KEY_BACKSPACE &&
          carattere != (char) KeyCodes.KEY_TAB){input.cancelKey();}
        }

      }
    };
   
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextBox.cancelKey()

        if (Character.isDigit(carattere)){
          // niente da fare qui
        }else if (carattere == (char) 109 || // carattere [ - ] in Opera e Firefox
              carattere == (char) 189){ // carattere [ - ] in MSIE, Safari e Chrome
          if (input == txtLight){
            input.cancelKey();
          }else{toCheck[curFocus] = true;}
        }else if (
              carattere == (char) 190){ // carattere [ . ]
          //toCheck = true;
        }else if (carattere == (char) KeyCodes.KEY_BACKSPACE){
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextBox.cancelKey()

        }else if (carattere == (char) KeyCodes.KEY_BACKSPACE){
          toCheck[curFocus] = true;
        }else if (carattere == (char) KeyCodes.KEY_TAB){
          // niente da fare qui, se ne occupa onBlur
        }else{
          input.cancelKey();
        }
      }
    };
   
    KeyUpHandler fUp = new KeyUpHandler(){
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextBox.cancelKey()

            if (!input.getText().isEmpty()
            &&(
                !Character.isDigit((char)event.getNativeKeyCode())||
                    (Integer.parseInt(input.getText()+(char)event.getNativeKeyCode())<0||
                    Integer.parseInt(input.getText()+(char)event.getNativeKeyCode())>23))) {
                input.cancelKey();
                }
          }
        }
     
     
View Full Code Here

Examples of com.google.gwt.user.client.ui.TextBox.cancelKey()

          if (!input.getText().isEmpty()
          &&(
              !Character.isDigit((char)event.getNativeKeyCode())||
                  (Integer.parseInt(input.getText()+(char)event.getNativeKeyCode())<0||
                  Integer.parseInt(input.getText()+(char)event.getNativeKeyCode())>59))) {
              input.cancelKey();
              }
        }
      }

 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.