Package com.vaadin.ui

Examples of com.vaadin.ui.TabSheet$Tab


        getLayout().setHeight("100%");
        getLayout().setSizeFull();
        getLayout().getParent().setSizeFull();

        TabSheet tabs = new TabSheet();
        tabs.setSizeFull();
        getLayout().addComponent(tabs);

        BrowserFrame help = new BrowserFrame();
        help.setSizeFull();
        help.setSource(new ExternalResource("/statictestfiles/long-html.htm"));

        tabs.addComponent(help);

    }
View Full Code Here


    @Override
    public void init() {
        mainWindow = new LegacyWindow("Tabsheet should cause scrollbars");
        setMainWindow(mainWindow);
        // mainWindow.getLayout().setSizeFull();
        tabSheet = new TabSheet();
        // tabSheet.setWidth("100%");
        Button button = new Button("Blah");
        button.setWidth("100%");
        Label label1 = new Label("Lorem ipsum");
        Label label2 = new Label("Lorem");
View Full Code Here

                .substring(getClass().getName().lastIndexOf(".") + 1));
        setMainWindow(main);

        main.getContent().setSizeFull();

        TabSheet ts = new TabSheet();
        ts.setSizeFull();

        final Table t = TestForTablesInitialColumnWidthLogicRendering
                .getTestTable(7, 2000);
        t.setSizeFull();
        ts.addTab(t, "Table, scrollins should not flash", null);

        final Label testContent = new Label(
                "TabSheet by default uses caption, icon, errors etc. from Components. ");

        testContent.setCaption("Introduction to test");

        ts.addTab(testContent);

        final VerticalLayout actions = new VerticalLayout();

        actions.setCaption("Test actions");

        ts.addTab(actions);

        Button b;

        b = new Button(
                "change introduction caption (should add * to tab name)",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        testContent.setCaption(testContent.getCaption() + "*");
                    }
                });
        actions.addComponent(b);

        b = new Button("change tab caption (should add * to tab name)",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        actions.setCaption(actions.getCaption() + "*");
                    }
                });

        actions.addComponent(b);

        final UserError e = new UserError("Test error");

        b = new Button("Toggle error", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                if (testContent.getComponentError() == null) {
                    testContent.setComponentError(e);
                } else {
                    testContent.setComponentError(null);
                }
            }
        });
        actions.addComponent(b);

        b = new Button("Change table caption", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                t.setCaption(t.getCaption() + "*");
            }
        });
        actions.addComponent(b);

        b = new Button("Toggle Table error", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                if (t.getComponentError() == null) {
                    t.setComponentError(e);
                } else {
                    t.setComponentError(null);
                }
            }
        });

        actions.addComponent(b);

        for (int i = 0; i < 20; i++) {
            Label l = new Label("Test Content");
            l.setCaption("Extra tab " + i);
            ts.addComponent(l);
        }

        main.addComponent(ts);

    }
View Full Code Here

    protected void setup(VaadinRequest request) {
        VerticalLayout layout = new VerticalLayout();
        layout.setMargin(true);
        setContent(layout);

        TabSheet tabSheet = new TabSheet();
        tabSheet.setId(TABSHEET);
        layout.addComponent(tabSheet);
        tabSheet.addTab(new TabComposite(), "Tab");
    }
View Full Code Here

        Table t = new Table("Table");
        t.addContainerProperty(P1, String.class, "");
        t.setSizeFull();

        TabSheet tabSheet = new TabSheet();
        tabSheet.setWidth("300px");
        tabSheet.setHeight("300px");

        tabSheet.addComponent(tf1);
        tabSheet.addComponent(t);

        getMainWindow().addComponent(tabSheet);

    }
View Full Code Here

        window.setWidth(40, Window.UNITS_PERCENTAGE);
        window.setHeight(40, Window.UNITS_PERCENTAGE);
        window.setModal(true);
        getMainWindow().addWindow(window);

        TabSheet tab = new TabSheet();
        tab.setSizeFull();

        tab.addTab(new TableView(), "users", null);
        tab.addTab(new TableView(), "groups", null);

        window.setContent(tab);
    }
View Full Code Here

        // setTheme("tests-tickets");
        createUI((AbstractOrderedLayout) w.getContent());
    }

    private void createUI(AbstractOrderedLayout layout) {
        ts = new TabSheet();
        layout.addComponent(ts);

        for (Class<? extends Component> c : classes) {
            ts.addTab(createComponent(c), c.getSimpleName(), null);
        }
View Full Code Here

            testContainer.addComponent(new DateField("DateField" + i));

            testContainer.addComponent(new Button("Button" + i));

            TabSheet ts = new TabSheet();

            for (int j = 0; j < INITIAL_COMPONENTS; j++) {
                Label tab = new Label("Tab content " + i + " " + j);
                tab.setCaption("Tab " + i + " " + j);
                ts.addTab(tab);
            }
            testContainer.addComponent(ts);

        }
View Full Code Here

        fillLayout(layoutG, componentCountC);
        // Add layout to panel
        panelGLayout.addComponent(layoutG);

        // Create TabSheet
        final TabSheet tabsheet = new TabSheet();
        tabsheet.setCaption("Tabsheet, above layouts are added to this component");
        layoutA = new HorizontalLayout();
        // Add 4 random components
        fillLayout(layoutA, componentCountA);
        tabsheet.addTab(layoutA, "Horizontal ordered layout", null);
        layoutB = new VerticalLayout();
        // Add 4 random components
        fillLayout(layoutB, componentCountB);
        tabsheet.addTab(layoutB, "Vertical ordered layout", null);
        layoutG = new GridLayout(gridSize, gridSize);
        // Add 12 random components
        fillLayout(layoutG, componentCountC);
        tabsheet.addTab(layoutG, "Grid layout (4 x 2)", null);

        // Create custom layout
        VerticalLayout panelCLayout = new VerticalLayout();
        panelCLayout.setMargin(true);
        final Panel panelC = new Panel("Custom layout with style exampleStyle",
View Full Code Here

        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        final Panel p = new Panel("Accordion Panel", pl);
        p.setSizeFull();

        tab = new TabSheet();
        tab.setSizeFull();

        VerticalLayout reportLayout = new VerticalLayout();
        final Panel report = new Panel("Monthly Program Runs", reportLayout);
        final VerticalLayout controls = reportLayout;
View Full Code Here

TOP

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

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.