Package com.vaadin.ui

Examples of com.vaadin.ui.TwinColSelect


        ListSelect list = new ListSelect("List Select");
        list.setNewItemsAllowed(true);
        row.addComponent(list);

        TwinColSelect tcs = new TwinColSelect("TwinCol Select");
        tcs.setLeftColumnCaption("Left Column");
        tcs.setRightColumnCaption("Right Column");
        tcs.setNewItemsAllowed(true);
        row.addComponent(tcs);

        TwinColSelect tcs2 = new TwinColSelect("Sized TwinCol Select");
        tcs2.setLeftColumnCaption("Left Column");
        tcs2.setRightColumnCaption("Right Column");
        tcs2.setNewItemsAllowed(true);
        tcs2.setWidth("280px");
        tcs2.setHeight("200px");
        row.addComponent(tcs2);

        for (int i = 1; i <= 10; i++) {
            select.addItem("Option " + i);
            list.addItem("Option " + i);
            tcs.addItem("Option " + i);
            tcs2.addItem("Option " + i);
        }
    }
View Full Code Here


        layout.addComponent(createSelect(new OptionGroup(
                "Option Group, enabled"), true));
        layout.addComponent(createSelect(new OptionGroup(
                "Option Group, disabled"), false));

        layout.addComponent(createSelect(new TwinColSelect(
                "Twin Column Select, enabled"), true));
        layout.addComponent(createSelect(new TwinColSelect(
                "Twin Column Select, disabled"), false));

        addTestComponent(layout);

    }
View Full Code Here

public class TwinColSelectCaptionStyles extends TestBase {

    @Override
    protected void setup() {
        setTheme("tests-tickets");
        final TwinColSelect sel = new TwinColSelect("Component caption");
        sel.setLeftColumnCaption("Left caption");
        sel.setRightColumnCaption("Right caption");
        sel.setStyleName("styled-twincol-captions");
        sel.setWidth("300px");
        addComponent(sel);

        Button b = new Button("Set height and width to 500px",
                new Button.ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        sel.setHeight("500px");
                        sel.setWidth("500px");

                    }
                });
        addComponent(b);
    }
View Full Code Here

    }

    @Override
    protected void initializeComponents() {

        TwinColSelect tws = createTwinColSelect("400x<auto>");
        tws.setWidth("400px");
        tws.setHeight("-1px");
        addTestComponent(tws);

        tws = createTwinColSelect("400x100");
        tws.setWidth("400px");
        tws.setHeight("100px");
        addTestComponent(tws);

        tws = createTwinColSelect("<auto>x100");
        tws.setWidth("-1px");
        tws.setHeight("100px");
        addTestComponent(tws);

        tws = createTwinColSelect("<auto>x<auto>");
        tws.setSizeUndefined();
        addTestComponent(tws);

    }
View Full Code Here

        addTestComponent(tws);

    }

    private TwinColSelect createTwinColSelect(String caption) {
        TwinColSelect select = new TwinColSelect(caption);
        select.addContainerProperty(CAPTION, String.class, null);
        for (int i = 0; i < 20; i++) {
            select.addItem("" + i).getItemProperty(CAPTION)
                    .setValue("Item " + i);
        }
        select.setImmediate(true);
        return select;
    }
View Full Code Here

        ogm.setMultiSelect(true);
        ogm.addItem("foo");
        ogm.addItem("bar");
        ogm.setTabIndex(index++);

        TwinColSelect ts = new TwinColSelect("8");
        ts.addItem("Foo");
        ts.addItem("Bar");
        ts.setTabIndex(index++);

        Button b = new Button("9");
        b.setTabIndex(index++);

        layout.addComponent(b);
View Full Code Here

        Panel test = createTestBench(new CheckBox());
        test.setCaption("CheckBox (configured from button)");
        main.addComponent(test);

        AbstractSelect s = new TwinColSelect();
        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);

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

        s = new OptionGroup();
        fillSelect(s, 20);
        s.setMultiSelect(true);
        test = createTestBench(s);
        test.setCaption("OptionGroup + multiselect manually (configured from select)");
        main.addComponent(test);

        final Button b = new Button("refresh view", new Button.ClickListener() {
View Full Code Here

        fields.add(tt);
        Tree tree = new Tree();
        tree.addItem("Item 1");
        fields.add(tree);
        fields.add(new TwinColSelect());
        fields.add(new PasswordField());
        fields.add(new TextField());
        fields.add(new TextArea());
        fields.add(new RichTextArea());
        fields.add(new CheckBox());
View Full Code Here

        test(layout, tf);

        final Tree tree = new Tree("Tree " + count++);
        test(layout, tree);

        final TwinColSelect twinColSelect = new TwinColSelect("TwinColSelect "
                + count++);
        test(layout, twinColSelect);

        final Upload upload = new Upload("Upload (non-functional)", null);
        test(layout, upload);
View Full Code Here

        l.addComponent(hl);

        AbstractSelect cb = new ComboBox();
        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);
        }

        hl.addComponent(cb);
        hl.addComponent(nat);
        hl.addComponent(list);
View Full Code Here

TOP

Related Classes of com.vaadin.ui.TwinColSelect

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.