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

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


                box.setVisibleLength(box.getText().length());
            }
        }));

        if (value.type.equals(SuggestionCompletionEngine.TYPE_NUMERIC)) {
            box.addKeyboardListener(getNumericFilter(box));
        }

        if (this.readOnly) {
            return new SmallLabel(box.getText());
        }
View Full Code Here


            if (at.value == null || "".equals(at.value)) box.setText("");

            box.setVisibleLength(10);
        }

        box.addKeyboardListener(new KeyboardListener() {

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

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

            public void onChange(Widget w) {
                rm.value = box.getText();
            }
        });

        box.addKeyboardListener(new KeyboardListener() {
            public void onKeyDown(Widget arg0, char arg1, int arg2) {}

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

            public void onKeyUp(Widget arg0, char arg1, int arg2) {
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

                makeDirty();
            }

        } );

        box.addKeyboardListener( new FieldEditListener( new Command() {
            public void execute() {
                box.setVisibleLength( box.getText().length() );
            }
        } ) );
View Full Code Here

                box.setVisibleLength( box.getText().length() );
            }
        } ) );

        if ( methodParameter.type.equals( SuggestionCompletionEngine.TYPE_NUMERIC ) ) {
            box.addKeyboardListener( getNumericFilter( box ) );
        }

        return box;
    }
View Full Code Here

                                 final FieldMetaModel field) {
        final FormStylePopup pop = new FormStylePopup();
        final TextBox fieldName = new TextBox();
        final TextBox fieldType = new TextBox();
        fieldName.addKeyboardListener( noSpaceListener() );
        fieldType.addKeyboardListener( noSpaceListener() );
        if ( field != null ) {
            fieldName.setText( field.name );
            fieldType.setText( field.type );
        }
        HorizontalPanel typeP = new HorizontalPanel();
View Full Code Here

        panel.clear();
        if ( flType.equals( SuggestionCompletionEngine.TYPE_NUMERIC ) ) {
            final TextBox box = editableTextBox( callback,
                                                 field.fieldName,
                                                 field.expected );
            box.addKeyboardListener( ActionValueEditor.getNumericFilter( box ) );
            panel.add( box );
        } else if ( flType.equals( SuggestionCompletionEngine.TYPE_BOOLEAN ) ) {
            String[] c = new String[]{"true", "false"};
            panel.add( new EnumDropDown( field.expected,
                                         new DropDownValueChanged() {
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

      p.add(ok);
     
    } else {
      final TextBox box = new TextBox();
      box.setText(val);
      box.addKeyboardListener(new KeyboardListenerAdapter() {
        public void onKeyUp(Widget sender, char keyCode, int modifiers) {
          if (keyCode == KeyboardListener.KEY_ENTER) {
            r.set(dta, box.getText());
            w.destroy();
          }
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.