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

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


            box.addItem(fields[i]);
        }

        box.setSelectedIndex(0);

        box.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                String fieldName = box.getItemText(box.getSelectedIndex());
                String qualifiedName = factType + "." + fieldName;
                String fieldType = (String) completions.getFieldType(qualifiedName);
                pattern.addConstraint(new SingleFieldConstraint(fieldName, fieldType, con));
                modeller.refreshWidget();
                popup.hide();
            }
        });
        popup.addAttribute(constants.AddARestrictionOnAField(), box);


        final ListBox composites = new ListBox();
        composites.addItem("...");
        composites.addItem(constants.AllOfAnd(), CompositeFieldConstraint.COMPOSITE_TYPE_AND);
        composites.addItem(constants.AnyOfOr(), CompositeFieldConstraint.COMPOSITE_TYPE_OR);
        composites.setSelectedIndex(0);

        composites.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                CompositeFieldConstraint comp = new CompositeFieldConstraint();
                comp.compositeJunctionType = composites.getValue(composites.getSelectedIndex());
                pattern.addConstraint(comp);
View Full Code Here


            permTypeBox.addItem(constants.pleaseChoose1());
            for (String s : items) {  permTypeBox.addItem(s); }
          }
        });

        permTypeBox.addChangeListener(new ChangeListener() {
          public void onChange(Widget w) {
            pop.clear();
            final String sel = permTypeBox.getItemText(permTypeBox.getSelectedIndex());
            if (sel.equals("admin")) { //NON-NLS
              com.google.gwt.user.client.ui.Button ok = new com.google.gwt.user.client.ui.Button(constants.OK());
View Full Code Here

                      field );
        doFieldLabel();

        final TextBox valueList = new TextBox();
        valueList.setText( editingCol.valueList );
        valueList.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                editingCol.valueList = valueList.getText();
            }
        } );
        HorizontalPanel vl = new HorizontalPanel();
        vl.add( valueList );
        vl.add( new InfoPopup( constants.ValueList(),
                               constants.ValueListsExplanation() ) );
        addAttribute( constants.optionalValueList(),
                      vl );

        final TextBox header = new TextBox();
        header.setText( col.header );
        header.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                editingCol.header = header.getText();
            }
        } );
        addAttribute( constants.ColumnHeaderDescription(),
View Full Code Here

        return true;
    }

    private TextBox getFieldLabel() {
        final TextBox box = new TextBox();
        box.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                editingCol.factField = box.getText();
            }
        } );
        return box;
View Full Code Here

        for ( int i = 0; i < idx; i++ ) {
            FactMetaModel mm_ = (FactMetaModel) models.models.get( i );
            typeChoice.addItem( mm_.name );
        }
        typeChoice.setSelectedIndex( 0 );
        typeChoice.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                fieldType.setText( typeChoice.getValue( typeChoice.getSelectedIndex() ) );
            }
        } );
View Full Code Here

                      field );
        doFieldLabel();

        final TextBox valueList = new TextBox();
        valueList.setText( editingCol.valueList );
        valueList.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                editingCol.valueList = valueList.getText();
            }
        } );
        HorizontalPanel vl = new HorizontalPanel();
        vl.add( valueList );
        vl.add( new InfoPopup( constants.ValueList(),
                               constants.ValueListsExplanation() ) );
        addAttribute( constants.optionalValueList(),
                      vl );

        final TextBox header = new TextBox();
        header.setText( col.header );
        header.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                editingCol.header = header.getText();
            }
        } );
        addAttribute( constants.ColumnHeaderDescription(),
View Full Code Here

        return hp;
    }

    private TextBox getFieldLabel() {
        final TextBox box = new TextBox();
        box.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                editingCol.factField = box.getText();
            }
        } );
        return box;
View Full Code Here

        fillSelectedFacts();
        return true;
      }
    });
   
    factsCombo.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        fillSelectedFactFields();
      }
    });
   
    fieldsCombo.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        fillFieldConstrains();
      }
    });
   
    Image addNewConstraint = new ImageButton("images/new_item.gif"); // NON-NLS
    addNewConstraint.setTitle(constants.AddNewConstraint());

    addNewConstraint.addClickListener(new ClickListener() {
      public void onClick(Widget w) {
        showNewConstrainPop();
      }
    });
   
        Image removeConstraint = new Image( "images/trash.gif" ); //NON-NLS
        removeConstraint.setTitle(constants.removeConstraint());
        removeConstraint.addClickListener(new ClickListener() {
      public void onClick(Widget arg0) {
        removeConstraint();
      }
    });
       
       
        final FlexTable table = new FlexTable();
       
    VerticalPanel vp = new VerticalPanel();
    vp.add(new SmallLabel(constants.FactTypes()));
    vp.add(factsCombo);
    table.setWidget(0, 0, vp);
   
    vp = new VerticalPanel();
    vp.add(new SmallLabel(constants.Field()));
    vp.add(fieldsCombo);
    table.setWidget(1, 0, vp);
   
    vp = new VerticalPanel();
    HorizontalPanel hp = new HorizontalPanel();
    vp.add(new SmallLabel("Constraints")); //TODO i18n
    hp.add(constraintsCombo);
   
    VerticalPanel btnPanel = new VerticalPanel();
    btnPanel.add(addNewConstraint);
    btnPanel.add(removeConstraint);
    hp.add(btnPanel);
    vp.add(hp);
    table.setWidget(2, 0, vp);
    table.getFlexCellFormatter().setRowSpan(2, 0, 3);
   
    constraintsCombo.addChangeListener(new ChangeListener() {
      public void onChange(Widget sender) {
        showConstraintConfig();
      }
    });
   
View Full Code Here

        text.getElement().setAttribute("spellcheck", "false");    //NON-NLS

        text.setStyleName( "default-text-Area" ); //NON-NLS

        text.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                data.content = text.getText();
                makeDirty();
            }
        } );
View Full Code Here

    for (String arg : list) {
      TextBox argTB = new TextBox();
      argTB.setText(getConstraintConfiguration().getArgumentValue(arg).toString());
      argTB.setName(argI18N.get(arg));
      argTB.setTitle(arg);
      argTB.addChangeListener(new ChangeListener() {
        public void onChange(Widget sender) {
          TextBox argTB = (TextBox) sender;
          getConstraintConfiguration().setArgumentValue(argTB.getName(), argTB.getText());
        }
      });
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.ChangeListener

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.