Package com.vaadin.ui

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


    @Override
    protected void setup(VaadinRequest request) {
        final ComboBox select = new ComboBox("ComboBox");
        select.addItem("one");
        select.addItem("two");
        select.addItem("three");
        addComponent(select);
    }

    @Override
View Full Code Here


    @Override
    protected void setup(VaadinRequest request) {
        final ComboBox select = new ComboBox("ComboBox");
        select.addItem("one");
        select.addItem("two");
        select.addItem("three");
        addComponent(select);
    }

    @Override
    protected String getTestDescription() {
View Full Code Here

        ComboBox cb = new ComboBox("Locale");
        cb.addContainerProperty(CAPTION, String.class, "");
        cb.setItemCaptionPropertyId(CAPTION);
        cb.setNullSelectionAllowed(false);
        for (Locale l : Locale.getAvailableLocales()) {
            Item i = cb.addItem(l);
            i.getItemProperty(CAPTION).setValue(
                    l.getDisplayName(Locale.ENGLISH));
        }
        ((Container.Sortable) cb.getContainerDataSource()).sort(
                new Object[] { CAPTION }, new boolean[] { true });
View Full Code Here

    @Override
    protected void setup() {
        final ComboBox l = new ComboBox("Please select a city");
        for (int i = 0; i < cities.length; i++) {
            l.addItem(cities[i]);
        }

        l.setFilteringMode(FilteringMode.OFF);
        l.setImmediate(true);
        l.setNewItemsAllowed(true);
View Full Code Here

    @Override
    protected void setup() {
        ComboBox cb = new ComboBox();
        for (int i = 1; i < 100; i++) {
            cb.addItem("Item " + i);
        }

        cb.setFilteringMode(FilteringMode.CONTAINS);
        addComponent(cb);
View Full Code Here

        addComponent(createReadOnlyForComboBox(combo));
    }

    private ComboBox createNewComboBoxA(String caption) {
        ComboBox combo = new ComboBox(caption);
        combo.addItem("first");
        combo.setValue("first");

        addComponent(combo);

        return combo;
View Full Code Here

    }

    private Component createComboBox() {
        ComboBox cb = new ComboBox("A combo box");

        cb.addItem("Yes");
        cb.addItem("No");
        cb.addItem("Maybe");
        return cb;
    }
View Full Code Here

    private Component createComboBox() {
        ComboBox cb = new ComboBox("A combo box");

        cb.addItem("Yes");
        cb.addItem("No");
        cb.addItem("Maybe");
        return cb;
    }

    @Override
View Full Code Here

    private Component createComboBox() {
        ComboBox cb = new ComboBox("A combo box");

        cb.addItem("Yes");
        cb.addItem("No");
        cb.addItem("Maybe");
        return cb;
    }

    @Override
    protected String getDescription() {
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {
        final ComboBox cbFoo = new ComboBox();
        cbFoo.setImmediate(true);
        cbFoo.setSizeUndefined();
        cbFoo.addItem("A really long string that causes an inline width to be set");

        Button btn = new Button("Click to break CB",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
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.