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

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


        }
      }
    });

    // Popup confirm password textbox
    confirmPasswordTextBox.addKeyPressHandler(new KeyPressHandler() {

      @Override
      public void onKeyPress(KeyPressEvent event) {

        if (event.getCharCode() == 13) {
View Full Code Here


            }
          }
        });

        // Popup svn url textbox
        svnUrlTextBox.addKeyPressHandler(new KeyPressHandler() {

          @Override
          public void onKeyPress(KeyPressEvent event) {

            if (event.getCharCode() == 13) {

              okButton.click();
            }
          }
        });

        // Popup svn password textbox
        svnPasswordTextBox.addKeyPressHandler(new KeyPressHandler() {

          @Override
          public void onKeyPress(KeyPressEvent event) {

            if (event.getCharCode() == 13) {
View Full Code Here

        setDynamicSafe( true );

        add( uiBinder.createAndBindUi( this ) );
        add( footer );

        nameTextBox.addKeyPressHandler( new KeyPressHandler() {
            @Override
            public void onKeyPress( final KeyPressEvent event ) {
                nameGroup.setType( ControlGroupType.NONE );
                nameHelpInline.setText( "" );
            }
View Full Code Here

  }

  private void initCreateTxt() {
    project = new NpTextBox();
    project.setVisibleLength(50);
    project.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
        if (event.getCharCode() == KeyCodes.KEY_ENTER) {
          doCreateProject();
        }
View Full Code Here

  }

  private void createUsernameBox() {
    username = new NpTextBox();
    username.setVisibleLength(25);
    username.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(final KeyPressEvent event) {
        if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
          event.preventDefault();
          password.selectAll();
          password.setFocus(true);
        }
      }
    });

    password = new PasswordTextBox();
    password.setVisibleLength(25);
    password.addKeyPressHandler(GlobalKey.STOP_PROPAGATION);
    password.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(final KeyPressEvent event) {
        if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
          event.preventDefault();
          onLogin();
View Full Code Here

    super(element);
    init();
  }

  private void init() {
    addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
        char c = event.getCharCode();
        if (c < '0' || '9' < c) {
          final int nativeCode = event.getNativeEvent().getKeyCode();
View Full Code Here

     * numeric conventions - it will also allow formulas (a formula is when the
     * first value is a "=" which means it is meant to be taken as the user
     * typed)
     */
    public static KeyPressHandler getNumericFilter(final TextBox box) {
        return new KeyPressHandler() {

            public void onKeyPress(KeyPressEvent event) {
                TextBox w = (TextBox) event.getSource();
                char c = event.getCharCode();
                if ( Character.isLetter( c ) && c != '=' && !(box.getText().startsWith( "=" )) ) {
View Full Code Here

            data.setWidget( i,
                            3,
                            del );

            //we only want numbers here...
            num.addKeyPressHandler( new KeyPressHandler() {
                public void onKeyPress(KeyPressEvent event) {
                    if ( Character.isLetter( event.getCharCode() ) ) {
                        ((TextBox) event.getSource()).cancelKey();
                    }
                }
View Full Code Here

            public void onClick(ClickEvent event) {
                hide();
            }
        });
        closeButton.addKeyPressHandler(new KeyPressHandler() {

            public void onKeyPress(KeyPressEvent event) {

                /*
                if the close button is triggered by a key we need to consume the key
View Full Code Here

    keyPressHandlerRegistration = null;
    keyPressJs = js.trim();
    if(!keyPressJs.isEmpty())
    {
     
      keyPressHandlerRegistration = addKeyPressHandler(new KeyPressHandler() {
        @Override
        public void onKeyPress(KeyPressEvent event) {
          VkStateHelper.getInstance().getEventHelper().executeEvent(keyPressJs, event, true);
        }
      });
View Full Code Here

TOP

Related Classes of com.google.gwt.event.dom.client.KeyPressHandler

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.