Package com.vaadin.ui

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


            cb.setItemIconPropertyId("icon");

            Item item = cb.addItem("FI");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/fi.gif"));
            item = cb.addItem("SE");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/se.gif"));

            addComponent(cb);
        }
View Full Code Here


        {
            ComboBox cb = new ComboBox();
            cb.addContainerProperty("icon", Resource.class, null);
            cb.setItemIconPropertyId("icon");

            Item item = cb.addItem("Finland");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/fi.gif"));
            item = cb.addItem("Australia");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/au.gif"));
View Full Code Here

            cb.setItemIconPropertyId("icon");

            Item item = cb.addItem("Finland");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/fi.gif"));
            item = cb.addItem("Australia");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/au.gif"));
            item = cb.addItem("Hungary");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/hu.gif"));
View Full Code Here

            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/fi.gif"));
            item = cb.addItem("Australia");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/au.gif"));
            item = cb.addItem("Hungary");
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../tests-tickets/icons/hu.gif"));

            cb.setValue("Hungary");
            addComponent(cb);
View Full Code Here

        ComboBox box = new ComboBox();
        // box.setMultiSelect(true);
        box.addContainerProperty("name", String.class, "");
        box.setItemCaptionPropertyId("name");
        for (int ix = 0; ix < 20; ix++) {
            box.addItem(x + 20 * y + ix).getItemProperty("name")
                    .setValue("" + x + ", " + y + " " + ix);
        }
        box.setValue(x + 20 * y);
        return box;
    }
View Full Code Here

        // components.add(popupDateField);

        components.add(new CheckBox("Default CheckBox"));

        ComboBox comboBox = new ComboBox("Default ComboBox");
        comboBox.addItem("Item1");
        components.add(comboBox);

        OptionGroup radioGroup = new OptionGroup("Single Items");
        radioGroup.addItem("Single Item 1");
        radioGroup.addItem("Single Item 2");
View Full Code Here

        final ComboBox comboBox = new ComboBox("My ComboBox");
        comboBox.setImmediate(true);
        comboBox.setNullSelectionAllowed(false);
        comboBox.setNewItemsAllowed(true);
        for (int i = 0; i < 10; i++) {
            comboBox.addItem("Item " + i);
        }

        final Label value = new Label("Selected: ");

        comboBox.addValueChangeListener(new Property.ValueChangeListener() {
View Full Code Here

    private ComboBox createComboBox(String caption) {
        ComboBox cb = new ComboBox(caption);
        cb.addContainerProperty("caption", String.class, null);
        cb.addContainerProperty("icon", Resource.class, null);
        for (int i = 1; i < 200 + 1; i++) {
            Item item = cb.addItem(i);
            item.getItemProperty("caption").setValue("Item " + i);
            item.getItemProperty("icon").setValue(
                    new ThemeResource("../runo/icons/16/users.png"));
        }
        cb.setItemIconPropertyId("icon");
View Full Code Here

        AbstractSelect nat = new NativeSelect();
        AbstractSelect list = new ListSelect();
        AbstractSelect twincol = new TwinColSelect();

        for (int i = 0; i < 50; i++) {
            cb.addItem("Item " + i);
            nat.addItem("Item " + i);
            list.addItem("Item " + i);
            twincol.addItem("Item " + i);
        }
View Full Code Here

public class ComboBoxSuggestionPopupClose extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        final ComboBox select = new ComboBox("ComboBox");
        select.addItem("one");
        select.addItem("two");
        select.addItem("three");
        addComponent(select);
    }
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.