Examples of KeyPressHandler


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

     * 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

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

        filter(gadgetFilter.getText());
      }
    });

    // Handle enter key event to select the filtered gadget.
    gadgetFilter.addKeyPressHandler(new KeyPressHandler() {
      public void onKeyPress(KeyPressEvent event) {
        filter(gadgetFilter.getText());
        if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER && selectedWidget != null) {
          select(selectedWidget.getGadgetUrl());
        }
      }
    });

    // Handle enter key on the url textbox to select the inserted gadget url.
    gadgetUrl.addKeyPressHandler(new KeyPressHandler() {
      public void onKeyPress(KeyPressEvent event) {
        String gadgetUrlText = gadgetUrl.getText();
        if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER && !gadgetUrlText.equals("")) {
          select(gadgetUrlText);
        }
View Full Code Here

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

                hop.setParameter( Integer.toString( index ),
                                  me.getText() );
            }

        } );
        this.addKeyPressHandler( new KeyPressHandler() {

            public void onKeyPress(KeyPressEvent event) {

                // Permit navigation
                int keyCode = event.getNativeEvent().getKeyCode();
View Full Code Here

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

                          userName );
        final PasswordTextBox password = new PasswordTextBox();
        pop.addAttribute( constants.Password(),
                          password );

        KeyPressHandler kph = new KeyPressHandler() {
            public void onKeyPress(KeyPressEvent event) {
                if ( KeyCodes.KEY_ENTER == event.getNativeEvent().getKeyCode() ) {
                    doLogin( userName,
                             password,
                             pop );
View Full Code Here

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

            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

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

        setDynamicSafe( true );

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

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

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

          startEvents();
        }
      }
    }));

    HANDLER_REGISTRATION_MAP.put(widget, widget.addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(final KeyPressEvent event) {
        if (event.getUnicodeCharCode() != 13 && event.getUnicodeCharCode() != 0) {
          stopEvents();
          entityChangeStream.notifyInsert(widget.getCursorPos(), String.valueOf(event.getCharCode()));
View Full Code Here

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

   
    setupFocusAndBlur();

    addStyleName("wide_search_field");
   
    addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
        if (KeyCodes.KEY_ESCAPE == event.getNativeEvent().getKeyCode()) {
          setText("");
          emptySuggestOracle();
View Full Code Here

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

      }
    }, 60 * 1000, kind, id);
  }

  private void addHandlers() {
    addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(KeyPressEvent event) {
        final String lastQuery = getText().trim() + event.getCharCode();
       
        if (!timerRunning) {
View Full Code Here

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

      @Override
      public void onOpenModule(OpenModuleEvent event) {
        view.selectTab(event.getModule());
      }
    });
    view.getFocus().addKeyPressHandler(new KeyPressHandler() {
      @Override
      public void onKeyPress(final KeyPressEvent event) {
        GWT.runAsync(new RunAsyncCallback() {
          @Override
          public void onSuccess() {
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.