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

Examples of com.google.gwt.user.client.ui.ListBox.addItem()


                        v.setExpectedCount( new Integer( 1 ) );
                    }
                }
            } );

            b.addItem( constants.ChooseDotDotDot() );

            num.addChangeHandler( new ChangeHandler() {
                public void onChange(ChangeEvent event) {
                    v.setExpectedCount( new Integer( num.getText() ) );
                }
View Full Code Here


        if ( this.readOnly ) {
            return new SmallLabel( this.constraint.getValue() );
        }

        final ListBox box = new ListBox();
        box.addItem( constants.Choose() );

        List<String> bindingsInScope = this.model.getBoundVariablesInScope( this.constraint );
        List<String> applicableBindingsInScope = getApplicableBindingsInScope( bindingsInScope );
        for ( String var : applicableBindingsInScope ) {
            box.addItem( var );
View Full Code Here

        box.addItem( constants.Choose() );

        List<String> bindingsInScope = this.model.getBoundVariablesInScope( this.constraint );
        List<String> applicableBindingsInScope = getApplicableBindingsInScope( bindingsInScope );
        for ( String var : applicableBindingsInScope ) {
            box.addItem( var );
            if ( this.constraint.getValue() != null && this.constraint.getValue().equals( var ) ) {
                box.setSelectedIndex( box.getItemCount() - 1 );
            }
        }
View Full Code Here

    protected void showAddFieldPopup(Widget w) {

        final FormStylePopup popup = new FormStylePopup( images.newexWiz(),
                                                         constants.ChooseAMethodToInvoke() );
        ListBox box = new ListBox();
        box.addItem( "..." );

        for ( int i = 0; i < fieldCompletionTexts.length; i++ ) {
            box.addItem( fieldCompletionTexts[i],
                         fieldCompletionValues[i] );
        }
View Full Code Here

                                                         constants.ChooseAMethodToInvoke() );
        ListBox box = new ListBox();
        box.addItem( "..." );

        for ( int i = 0; i < fieldCompletionTexts.length; i++ ) {
            box.addItem( fieldCompletionTexts[i],
                         fieldCompletionValues[i] );
        }

        box.setSelectedIndex( 0 );
View Full Code Here

        final HorizontalPanel simulDatePanel = simulDate();
        simulDatePanel.setVisible( isScenarioSimulatedDateSet() );

        final ListBox choice = new ListBox();

        choice.addItem( constants.UseRealDateAndTime() );
        choice.addItem( constants.UseASimulatedDateAndTime() );
        choice.setSelectedIndex( (executionTrace.getScenarioSimulatedDate() == null) ? 0 : 1 );
        choice.addChangeHandler( new ChangeHandler() {

            public void onChange(ChangeEvent event) {
View Full Code Here

        simulDatePanel.setVisible( isScenarioSimulatedDateSet() );

        final ListBox choice = new ListBox();

        choice.addItem( constants.UseRealDateAndTime() );
        choice.addItem( constants.UseASimulatedDateAndTime() );
        choice.setSelectedIndex( (executionTrace.getScenarioSimulatedDate() == null) ? 0 : 1 );
        choice.addChangeHandler( new ChangeHandler() {

            public void onChange(ChangeEvent event) {
                if ( choice.getSelectedIndex() == 0 ) {
View Full Code Here

        for ( String v : vars ) {
            FactData factData = (FactData) model.getFactTypes().get( v );
            if ( factData.getType().equals( this.methodParameter.type ) ) {
                // First selection is empty
                if ( listVariable.getItemCount() == 0 ) {
                    listVariable.addItem( "..." );
                }

                listVariable.addItem( "=" + v );
            }
        }
View Full Code Here

                // First selection is empty
                if ( listVariable.getItemCount() == 0 ) {
                    listVariable.addItem( "..." );
                }

                listVariable.addItem( "=" + v );
            }
        }
        if ( methodParameter.value.equals( "=" ) ) {
            listVariable.setSelectedIndex( 0 );
        } else {
View Full Code Here

                final FormStylePopup pop = new FormStylePopup(); //NON-NLS
                pop.setTitle( constants.ChooseDotDotDot() );
                final ListBox fieldsListBox = new ListBox();
                for ( int i = 0; i < fields.length; i++ ) {
                    String field = fields[i];
                    if ( !existingFields.contains( field ) ) fieldsListBox.addItem( field );
                }

                Button ok = new Button( constants.OK() );
                ok.addClickHandler( new ClickHandler() {
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.