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

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


        final TextBox box = new TextBox();


        list.setSelectedIndex(0);

        list.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                String attr = list.getItemText(list.getSelectedIndex());
                if (attr.equals(RuleAttributeWidget.LOCK_LHS) || attr.equals(RuleAttributeWidget.LOCK_RHS)) {
                    model.addMetadata(new RuleMetadata(attr, "true"));
View Full Code Here


        if (completions.getDSLConditions().length == 0 && facts.length == 0) {
            popup.addRow(new HTML("<div class='highlight'>" + constants.NoModelTip() + "</div>")); //NON-NLS
        }

        final ChangeListener cl = new ChangeListener() {

            public void onChange(Widget sender) {
                int sel = choices.getSelectedIndex();
                if (sel != -1) {
                    Command cmd = cmds.get(choices.getValue(choices.getSelectedIndex()));
                    if (cmd != null) {
                        cmd.execute();
                    }
                    verifyRule(null);
                }
            }
        };
        //choices.addChangeListener(cl);

        choices.addKeyboardListener(new KeyboardListenerAdapter() {

            @Override
            public void onKeyUp(final Widget sender, char keyCode, int modifiers) {
                if (keyCode == KeyboardListener.KEY_ENTER) {
                    cl.onChange(sender);
                }
            }
        });

        //only show the drop down if we are not using fixed position.
        if (position == null) {
            HorizontalPanel hp0 = new HorizontalPanel();
            hp0.add(new HTML(constants.PositionColon()));
            hp0.add(positionCbo);
            hp0.add(new InfoPopup(constants.PositionColon(), constants.ConditionPositionExplanation()));
            popup.addRow(hp0);
        }

        HorizontalPanel hp = new HorizontalPanel();
        hp.add(choices);
        Button b = new Button(constants.OK());
        hp.add(b);
        b.addClickListener(new ClickListener() {

            public void onClick(final Widget sender) {
                cl.onChange(sender);
            }
        });
        popup.addRow(hp);

        popup.show();
View Full Code Here

            setVisibleLength( 8 );
        } else {
            setVisibleLength( v.length() + 1 );
        }

        addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                c.value = getText();
            }
        } );
View Full Code Here

//        box.addItem("...");
//        box.addItem("TODO: Add Facts that extedns Collection");

        box.setSelectedIndex(0);

        box.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                pattern.setFactPattern(new FactPattern(box.getValue(box.getSelectedIndex())));
                setModified(true);
                getModeller().refreshWidget();
View Full Code Here

        final FormStylePopup popup = new FormStylePopup();
        popup.setTitle(constants.NewFactPattern());
        popup.addAttribute(constants.chooseFactType(),
                box);

        box.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                getFromCollectPattern().setRightPattern(new FactPattern(box.getItemText(box.getSelectedIndex())));
                setModified(true);
                getModeller().refreshWidget();
View Full Code Here

        final FormStylePopup popup = new FormStylePopup();
        popup.setTitle(constants.NewFactPattern());
        popup.addAttribute(constants.chooseFactType(),
                box);

        box.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                pattern.setFactPattern(new FactPattern(box.getItemText(box.getSelectedIndex())));
                setModified(true);
                getModeller().refreshWidget();
View Full Code Here

                }
            }
        }
        if ( listVariable.getItemCount() > 0 ) {

            listVariable.addChangeListener( new ChangeListener() {
                public void onChange(Widget arg0) {
                    ListBox w = (ListBox) arg0;
                    methodParameter.value = w.getValue( w.getSelectedIndex() );
                    if (onValueChangeCommand != null){
                        onValueChangeCommand.execute();
View Full Code Here

            box.setVisibleLength( 6 );
        } else {
            box.setVisibleLength( c.value.length() - 1 );
        }

        box.addChangeListener( new ChangeListener() {
            public void onChange(Widget w) {
                c.value = box.getText();
                if (onValueChangeCommand != null) {
                    onValueChangeCommand.execute();
                }
View Full Code Here

                }
            }
        }
        if (listVariable.getItemCount() > 0) {

            listVariable.addChangeListener(new ChangeListener() {

                public void onChange(Widget arg0) {
                    ListBox w = (ListBox) arg0;
                    value.value = "=" + w.getValue(w.getSelectedIndex());
                    executeOnChageCommand();
View Full Code Here

            box.setVisibleLength(6);
        } else {
            box.setVisibleLength(c.value.length() - 1);
        }

        box.addChangeListener(new ChangeListener() {

            public void onChange(Widget w) {
                c.value = box.getText();
                executeOnChageCommand();
                makeDirty();
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.