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

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


     * 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 KeyboardListener getNumericFilter(final TextBox box) {
        return new KeyboardListener() {

            public void onKeyDown(Widget arg0,
                                  char arg1,
                                  int arg2) {

View Full Code Here


        pop.show();
    }

    private KeyboardListener noSpaceListener() {
        return new KeyboardListener() {
            public void onKeyDown(Widget arg0,
                                  char arg1,
                                  int arg2) {
            }
View Full Code Here

            data.setWidget(i, 3, del);



            //we only want numbers here...
            num.addKeyboardListener(new KeyboardListener() {
                    public void onKeyDown(Widget arg0, char arg1, int arg2) {}
                    public void onKeyPress(Widget w, char c, int i) {
                        if (Character.isLetter( c ) ) {
                            ((TextBox) w).cancelKey();
                        }
View Full Code Here

            public void onLostFocus(Widget w) {
                filter.setText( defaultMessage );
            }
        } );
        filter.addKeyboardListener( new KeyboardListener() {

            public void onKeyDown(Widget arg0,
                                  char arg1,
                                  int arg2) {
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 KeyboardListener getNumericFilter(final TextBox box) {
        return new KeyboardListener() {

            public void onKeyDown(Widget arg0,
                                  char arg1,
                                  int arg2) {

View Full Code Here

    this.listBox = listBox;
    this.listBox.setMultipleSelect(false);
    //this.listBox.setVisibleItemCount(10);
    this.listBox.addStyleName("mosaic-ComboBoxList");

    super.addKeyboardListener(new KeyboardListener() {
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        // Nothing to do here!
      }

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

    layoutPanel.setPadding(0);
    layoutPanel.setWidgetSpacing(0);

    input = new TextBox();
    layoutPanel.add(input, new BoxLayoutData(FillStyle.BOTH));
    input.addKeyboardListener(new KeyboardListener() {
      public void onKeyDown(Widget sender, char keyCode, int modifiers) {
        switch (keyCode) {
          case KEY_ENTER:
          case KEY_TAB:
          case KEY_ESCAPE:
View Full Code Here

    dbidtb.setName("dbidtb");

    grid.setWidget(0, 1, dbidtb);

    // id validation
    dbidtb.addKeyboardListener(new KeyboardListener() {
      public void onKeyDown(final Widget sender, final char keyCode,
          final int modifiers) {

      }
View Full Code Here

    public TextBox(final boolean updateOnKeypress) {
        final TextBox 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

    }

    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

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.