Package com.vaadin.ui

Examples of com.vaadin.ui.ComboBox.addListener()


        for (Locale l : Locale.getAvailableLocales()) {
            cb.addItem(l);
        }
        cb.setImmediate(true);
        cb.setValue(Locale.US);
        cb.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                recreateTable();
            }
View Full Code Here


        final ComboBox comboBox = new ComboBox();
        for (int i = 0; i < 5; ++i) {
            comboBox.addItem("Item " + i);
        }

        comboBox.addListener(new FieldEvents.FocusListener() {
            @Override
            public void focus(FieldEvents.FocusEvent event) {
                comboBox.addItem();
            }
        });
View Full Code Here

        s.addItem("-- Choose value --");
        s.setValue("-- Choose value --");
        s.addItem(VerticalLayout.class);
        s.addItem(HorizontalLayout.class);
        s.addItem(GridLayout.class);
        s.addListener(new ComboBox.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                Object value = s.getValue();
                if (!value.equals("-- Choose value --")) {
View Full Code Here

        tf.addListener(focusListener);
        tf.addListener(blurListener);
        df.addListener(focusListener);
        df.addListener(blurListener);
        cb.addListener(focusListener);
        cb.addListener(blurListener);
        btn.addListener(focusListener);
        btn.addListener(blurListener);
        nbtn.addListener(focusListener);
        nbtn.addListener(blurListener);
View Full Code Here

        tf.addListener(focusListener);
        tf.addListener(blurListener);
        df.addListener(focusListener);
        df.addListener(blurListener);
        cb.addListener(focusListener);
        cb.addListener(blurListener);
        btn.addListener(focusListener);
        btn.addListener(blurListener);
        nbtn.addListener(focusListener);
        nbtn.addListener(blurListener);
        chkb.addListener(focusListener);
View Full Code Here

            select.addItem("item " + i);
        }

        final Label value = new Label();

        select.addListener(new ComboBox.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                System.err
                        .println("Selected " + event.getProperty().getValue());
View Full Code Here

        cb.setDescription("Some Combobox");
        addComponent(cb);

        final ObjectProperty<String> log = new ObjectProperty<String>("");

        cb.addListener(new FieldEvents.FocusListener() {
            @Override
            public void focus(FocusEvent event) {
                log.setValue(log.getValue().toString() + "<br>" + counter
                        + ": Focus event!");
                counter++;
View Full Code Here

                counter++;
                changeValue(cb);
            }
        });

        cb.addListener(new FieldEvents.BlurListener() {
            @Override
            public void blur(BlurEvent event) {
                log.setValue(log.getValue().toString() + "<br>" + counter
                        + ": Blur event!");
                counter++;
View Full Code Here

        layout.setSizeUndefined();
        popup.setContent(layout);

        ComboBox comboBox = new ComboBox("Combo box", Arrays.asList("Option 1",
                "Option 2", "Option 3"));
        comboBox.addListener(new FieldEvents.FocusListener() {
            @Override
            public void focus(FocusEvent event) {
                popup.close();
            }
        });
View Full Code Here

                    l.getDisplayName(Locale.ENGLISH));
        }
        ((Container.Sortable) cb.getContainerDataSource()).sort(
                new Object[] { CAPTION }, new boolean[] { true });
        cb.setImmediate(true);
        cb.addListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                updateLocale((Locale) localeSelect.getValue());
            }
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.