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

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


        } else {

            final TextBox box = boundTextBox(constraint);

            if (this.numericValue) {
                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( 10 );
        }



        box.addKeyboardListener( new KeyboardListener() {

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

                rm.value = box.getText();
            }
        });


        box.addKeyboardListener( new KeyboardListener() {

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

  private void showFieldEditor(final FactModels models, final FactMetaModel mm, 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

  public static Widget editableCell(final ValueChanged changeEvent, String factType, String fieldName, String initialValue, SuggestionCompletionEngine sce) {
    String key  = factType + "." + fieldName;
    String flType = sce.fieldTypes.get(key);
    if (flType.equals(SuggestionCompletionEngine.TYPE_NUMERIC)) {
      final TextBox box = editableTextBox(changeEvent, fieldName, initialValue);
      box.addKeyboardListener(ActionValueEditor.getNumericFilter(box));
          return box;
    } else if (flType.equals(SuggestionCompletionEngine.TYPE_BOOLEAN )) {
      String[] c = new String[] {"true", "false"};
      return ConstraintValueEditor.enumDropDown(initialValue, changeEvent, DropDownData.create(c));
    } else {
View Full Code Here

    w.setPlain(true);
    w.setBodyBorder(false);
    w.setTitle(dta);
    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

        }
      }
    });

    if (dt.isNumeric(colConf, getSCE())) {
      box.addKeyboardListener(ActionValueEditor.getNumericFilter(box));
    }

    Panel p = new Panel();
    p.add(box);
    w.add(p);
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

            dt.setText("<" + fmt + ">");
        } else {
            dt.setText(ext.scenarioSimulatedDate.toLocaleString());
        }
        final SmallLabel dateHint = new SmallLabel();
        dt.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 w, char arg1, int arg2) {
        try {
          Date d = new Date(dt.getText());
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.