Package com.vaadin.ui

Examples of com.vaadin.ui.TabSheet$SelectedTabChangeListener


        /*
         * Cast to a TabSheet. This isn't really necessary in this example, as
         * we have only one TabSheet component, but would be useful if there
         * were multiple TabSheets.
         */
        TabSheet source = (TabSheet) event.getSource();
        if (source == tabsheet) {
            /* If the first tab was selected. */
            if (source.getSelectedTab() == tab1_root) {
                System.out.println("foo");
                tab2_root.setEnabled(false);
                tab3_root.setEnabled(false);
            }
        }
View Full Code Here


        l1.setMargin(true);
        l1.addComponent(new Label("This is a label."));
        l1.addComponent(new TextField(null, "Click here"));
        l1.addComponent(new Link("Click here", null));

        TabSheet t = new TabSheet();
        t.setHeight("200px");
        t.addTab(l1, "Tab", null);
        layout.addComponent(t);

        VerticalLayout nestedLayout = new VerticalLayout();
        nestedLayout.addComponent(new Label("This is a label."));
        nestedLayout.addComponent(new TextField(null, "Click here"));
View Full Code Here

public class TabSheetWithDisappearingContent extends TestBase {

    @Override
    protected void setup() {
        final TabSheet t = new TabSheet();

        for (int i = 1; i < 4; i++) {
            VerticalLayout v = new VerticalLayout();
            v.addComponent(new Label("Content " + i));
            Tab tab = t.addTab(v, "Tab " + i);
            tab.setClosable(true);
        }
        addComponent(t);
    }
View Full Code Here

        VerticalLayout vl = new VerticalLayout();
        vl.setSizeFull();

        HorizontalSplitPanel horizontalSplit = new HorizontalSplitPanel();

        TabSheet ts = new TabSheet();

        VerticalLayout tabContent = new VerticalLayout();
        tabContent.setSizeFull();

        Panel p = new Panel();
        p.addStyleName(Runo.PANEL_LIGHT);
        p.setHeight("400px");
        tabContent.addComponent(p);

        ts.addTab(tabContent);
        horizontalSplit.setSecondComponent(ts);

        vl.addComponent(horizontalSplit);

        setContent(vl);
View Full Code Here

            }
        });

        getLayout().addComponent(button);

        left = new TabSheet();
        l1 = new Label("Left 1");
        left.addTab(l1, "L1");
        l2 = new Label("Left 2");
        left.addTab(l2, "L2");
        left.setWidth("400px");

        right = new TabSheet();
        r1 = new Label("Right 1");
        right.addTab(r1, "R1");
        r2 = new Label("Right 2");
        right.addTab(r2, "R2");
        right.setWidth("400px");
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {

        final Table table = createTable();

        TabSheet tabSheet = new TabSheet();
        tabSheet.addTab(table, "tab1");
        tabSheet.setHeight("5000px");
        tabSheet.setWidth("100%");
        addComponent(tabSheet);

        final Button button = new Button("Refresh table");
        button.addClickListener(new Button.ClickListener() {
View Full Code Here

        return 2473;
    }

    @Override
    protected void setup() {
        TabSheet tabsheet = new TabSheet();
        tabsheet.setWidth(null);
        tabsheet.setHeight("200px");
        TextArea tf = new TextArea();
        tf.setRows(2);
        tf.setHeight("300px");
        tf.setWidth("200px");
        tabsheet.addTab(
                tf,
                "A text area that is 200px wide, the tab bar for the tabsheet is wider",
                null);
        TextArea tf2 = new TextArea("Another tab", "b");
        tf2.setWidth("1000px");
        tf2.setHeight("50px");
        tabsheet.addTab(tf2);
        addComponent(tabsheet);
    }
View Full Code Here

    }

    private VerticalLayout createMainLayout() {
        VerticalLayout layout = new VerticalLayout();

        tabSheet = new TabSheet();
        for (int i = 1; i <= TABS_COUNT; i++) {
            label[i - 1] = new Label("Tab " + i);
            tab[i - 1] = tabSheet.addTab(label[i - 1], "Tab " + i, null);
            tab[i - 1].setEnabled(false);
        }
View Full Code Here

*/
public class TabSpaceNotScroll extends AbstractTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        TabSheet tabSheet = new TabSheet();

        for (int i = 0; i < 5; i++) {
            String caption = "Tab " + i;
            Component c = new Label(caption);
            tabSheet.addTab(c, caption);
        }

        addComponent(tabSheet);

        Label dontShowThis = new Label("Page scroll. This is bad.");
View Full Code Here

        log("Tab " + tabSheet.getTabPosition(tab) + " closed");
    }

    @Override
    public void selectedTabChange(SelectedTabChangeEvent event) {
        TabSheet ts = event.getTabSheet();
        log("Tab " + ts.getTabPosition(ts.getTab(ts.getSelectedTab()))
                + " selected");

    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.TabSheet$SelectedTabChangeListener

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.