Examples of NativeSelect


Examples of com.vaadin.ui.NativeSelect

            public void buttonClick(ClickEvent event) {
                log.log("First visible item id is: "
                        + treeTable.getCurrentPageFirstItemId());
            }
        });
        NativeSelect cacheRateSelect = new NativeSelect("Cache rate");
        cacheRateSelect.setImmediate(true);
        cacheRateSelect.setNullSelectionAllowed(false);
        cacheRateSelect.addItem(new Integer(0));
        cacheRateSelect.addItem(new Integer(1));
        cacheRateSelect.addItem(new Integer(2));
        cacheRateSelect.setValue(2);
        cacheRateSelect.addValueChangeListener(new ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                treeTable
                        .setCacheRate((Integer) event.getProperty().getValue());
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

        String longString = "Very, very long";

        HorizontalLayout hl = new HorizontalLayout();

        for (int i = 0; i < 2; i++) {
            NativeSelect ns = new NativeSelect(shortString);
            ns.addItem(longString);
            ns.setNullSelectionAllowed(false);
            ns.select(longString);
            hl.addComponent(ns);
        }
        mainWindow.addComponent(hl);
    }
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

        ListSelect lss = new ListSelect("5");
        lss.addItem("foo");
        lss.addItem("Bar");
        lss.setTabIndex(index++);

        NativeSelect ns = new NativeSelect("6");
        ns.addItem("foo");
        ns.addItem("bar");
        ns.setTabIndex(index++);

        OptionGroup og = new OptionGroup("7");
        og.addItem("foo");
        og.addItem("bar");
        og.setTabIndex(index++);
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

            public void buttonClick(ClickEvent event) {
                form.getField("Date").setValue(new Date(0));
            }
        });

        NativeSelect nativeSelect = new NativeSelect("NativeSelect");
        form.addField("Native Select", nativeSelect);
        nativeSelect.addItem("Value 1");

        // in #4103, the Select component was behaving differently from others
        form.addField("Select", new Select("Select"));

        Select select2 = new Select("Select 2");
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

        t.setSelectable(true);
        t.addContainerProperty("foo", String.class, "bar");
        t.addItem();
        fields.add(t);
        fields.add(new ComboBox());
        fields.add(new NativeSelect());
        fields.add(new ListSelect());
        fields.add(new TextField());
        fields.add(new PopupDateField());
        fields.add(new InlineDateField());
        OptionGroup og = new OptionGroup();
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

        fillSelect(s, 20);
        test = createTestBench(s);
        test.setCaption("TwinColSelect (configured from select)");
        main.addComponent(test);

        s = new NativeSelect();
        fillSelect(s, 20);
        test = createTestBench(s);
        test.setCaption("Native (configured from select)");
        main.addComponent(test);
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

        final Link link = new Link("Link " + count++, new ExternalResource(
                "www.vaadin.com"));
        test(layout, link);

        final NativeSelect nativeSelect = new NativeSelect("NativeSelect "
                + count++);
        test(layout, nativeSelect);

        final OptionGroup optionGroup = new OptionGroup("OptionGroup "
                + count++);
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

        addFocusableTest(f);
        addFocusableTest(new ComboBox());
        addFocusableTest(new TextField());
        addFocusableTest(new DateField());
        addFocusableTest(new NativeSelect());
        addFocusableTest(new ListSelect());
        addFocusableTest(new OptionGroup());
        OptionGroup optionGroup = new OptionGroup();
        optionGroup.setMultiSelect(true);
        addFocusableTest(optionGroup);
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

        postfix = new TextField("Postfix",
                " - closes automatically after 10 seconds");
        addComponent(postfix);

        role = new NativeSelect("NotificationRole");
        role.addItem(NotificationRole.ALERT);
        role.addItem(NotificationRole.STATUS);
        role.setValue(role.getItemIds().iterator().next());
        addComponent(role);
View Full Code Here

Examples of com.vaadin.ui.NativeSelect

    private Component customFormats = null;

    @Override
    protected void setup() {
        final NativeSelect s = new NativeSelect("Locale");
        s.setImmediate(true);
        s.setNullSelectionAllowed(false);
        s.addContainerProperty(CAPTION, String.class, "");
        addLocale(Locale.FRANCE, s);
        addLocale(Locale.CHINESE, s);
        addLocale(Locale.US, s);
        addLocale(Locale.UK, s);
        addLocale(new Locale("fi", "FI"), s);

        s.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                setDateFieldLocale((Locale) s.getValue());
            }
        });
        addComponent(s);
        s.setValue(Locale.FRANCE);
    }
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.