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

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


            panel.add( new HTML( " " ) );
            panel.add( box );
            panel.add( new HTML( " " ) );

            box.addChangeListener( new ChangeListener() {
                public void onChange(Widget w) {
                    TextBox otherBox = (TextBox) w;

                    if ( !regex.equals( "" ) && !otherBox.getText().matches( regex ) ) {
                        Window.alert( Format.format( constants.TheValue0IsNotValidForThisField(),
View Full Code Here


                    list.addItem( display,
                                  realValue );
                }
                if ( selected >= 0 ) list.setSelectedIndex( selected );
            }
            list.addChangeListener( new ChangeListener() {
                public void onChange(Widget w) {
                    updateSentence();
                    makeDirty();
                }
            } );
View Full Code Here

        box.setSelectedIndex( 0 );

        popup.addAttribute( constants.ChooseAMethodToInvoke(),
                            box );
        box.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                model.state = ActionCallMethod.TYPE_DEFINED;

                String methodName = box.getItemText( box.getSelectedIndex() );
                String methodNameWithParams = box.getValue( box.getSelectedIndex() );
View Full Code Here

        if ( modifiers != null ) {
            for ( int i = 0; i < modifiers.length; i++ ) {
                box.addItem( modifiers[i] );
            }
        }
        box.addChangeListener( new ChangeListener() {

            public void onChange(Widget arg0) {
                String methodName = box.getItemText( box.getSelectedIndex() );
                val.setMethod( methodName );
            }
View Full Code Here

                        final DropDownData dropData) {
        final Constants cs = GWT.create( Constants.class );

        this.valueChanged = valueChanged;

        addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                valueChanged.valueChanged( getItemText( getSelectedIndex() ),
                                           getValue( getSelectedIndex() ) );
            }
        } );
View Full Code Here

        for (String v : getRuleModel().getBoundFacts()) {
            startPoint.addItem(v, VARIABLE_VALUE_PREFIX + "." + v);
        }

        startPoint.setVisibleItemCount(1);
        startPoint.addChangeListener(new ChangeListener() {

            public void onChange(Widget sender) {
                ListBox lb = (ListBox) sender;
                int index = lb.getSelectedIndex();
                if (index > 0) {
View Full Code Here

            lb.addItem("<==" + constants.DeleteItem(), DELETE_VALUE);
            for (Map.Entry<String, String> entry : getCompletionsForCurrentType().entrySet()) {
                lb.addItem(entry.getKey(), entry.getValue());
            }

            lb.addChangeListener(new ChangeListener() {

                public void onChange(Widget sender) {
                    ListBox box = (ListBox) sender;
                    panel.remove(box);
                    if (box.getSelectedIndex() > 0) {
                        onChangeSelection(box.getValue(box.getSelectedIndex()));
                    }
                }
            });
            return lb;
        } else {//if (SuggestionCompletionEngine.TYPE_COLLECTION.equals(getCurrentGenericType())) {
            ListBox lb = new ListBox();
            lb.setVisibleItemCount(1);
            lb.addItem(constants.ChooseDotDotDot(), "");
            lb.addItem("<==" + constants.DeleteItem(), DELETE_VALUE);
            for (Map.Entry<String, String> entry : getCompletionsForCurrentType().entrySet()) {
                lb.addItem(entry.getKey(), entry.getValue());
            }
            lb.addChangeListener(new ChangeListener() {

                public void onChange(Widget sender) {
                    ListBox box = (ListBox) sender;
                    panel.remove(box);
                    if (box.getSelectedIndex() > 0) {
View Full Code Here

                box.setSelectedIndex( i + 1 );
            }

        }

        box.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                con.operator = box.getValue( box.getSelectedIndex() );
            }
        } );
View Full Code Here

        }

        box.setSelectedIndex(0);

        popup.addAttribute(constants.AddField(), box);
        box.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                String fieldName = box.getItemText(box.getSelectedIndex());

                String fieldType = completions.getFieldType(variableClass, fieldName);
View Full Code Here

            box.addItem(fields[i]);
        }

        box.setSelectedIndex(0);

        box.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                composite.addConstraint(new SingleFieldConstraint(box.getItemText(box.getSelectedIndex())));
                modeller.refreshWidget();
                popup.hide();
            }
        });
        popup.addAttribute(constants.AddARestrictionOnAField(), box);


        final ListBox composites = new ListBox();
        composites.addItem("..."); //NON-NLS
        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());
                composite.addConstraint(comp);
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.