Package com.vaadin.ui

Examples of com.vaadin.ui.Panel


                        + "server side components are mostly just classes that in constructor "
                        + "set base class to state that programmer wants."));

        main.addComponent(new Button("commit"));

        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() {
            @Override
            public void buttonClick(ClickEvent event) {
View Full Code Here


        layout.addComponent(wrapLayout(layout_basic_test(new HorizontalLayout())));
        layout.addComponent(wrapLayout(layout_basic_test(new VerticalLayout())));
    }

    private Layout wrapLayout(Layout ol) {
        Panel p = new Panel(ol);
        p.setSizeUndefined();
        p.setCaption(ol.getCaption());
        ol.setCaption(null);

        VerticalLayout l = new VerticalLayout();
        l.setSizeUndefined();
        l.addComponent(p);
View Full Code Here

            return file;
        }
        // Add failure notification as an Panel to main window
        VerticalLayout errorLayout = new VerticalLayout();
        errorLayout.setMargin(true);
        final Panel errorPanel = new Panel("Demo application error",
                errorLayout);
        errorPanel.setStyleName("strong");
        errorPanel.setComponentError(new SystemError(
                "Cannot provide sample directory"));
        errorLayout.addComponent(new Label(errorMessage, ContentMode.HTML));
        // Remove all components from applications main window
        uI.removeAllComponents();
        // Add error panel
View Full Code Here

    @Override
    protected void setup(VaadinRequest request) {
        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        Panel p = new Panel("Panel", pl);
        addComponent(p);
        pl.addComponent(new Label("Panel content"));

        pl = new VerticalLayout();
        pl.setMargin(true);
        p = new Panel("Light Panel", pl);
        p.addStyleName(LiferayTheme.PANEL_LIGHT);
        addComponent(p);
        pl.addComponent(new Label("Panel content"));
    }
View Full Code Here

        test(main);
        populateLayout(main);

        VerticalLayout panelLayout = new VerticalLayout();
        panelLayout.setMargin(true);
        final Panel panel = new Panel("Panel", panelLayout);
        test(panel);
        populateLayout(panelLayout);

        final TabSheet tabsheet = new TabSheet();
        test(tabsheet);
View Full Code Here

        final Embedded emb = new Embedded("Embedded " + count++);
        test(layout, emb);

        VerticalLayout panelLayout = new VerticalLayout();
        panelLayout.setMargin(true);
        final Panel panel = new Panel("Panel " + count++, panelLayout);
        test(layout, panel);

        final Label label = new Label("Label " + count++);
        test(layout, label);
View Full Code Here

                }
            }
        });

        testPanelLayout = new VerticalLayout();
        testPanel = new Panel(testPanelLayout);
        testPanel.setSizeFull();
        testPanel.setStyleName("testable");
        main.addComponent(testPanel);
        main.setExpandRatio(testPanel, 1);
View Full Code Here

                                Component c = super.getComponent();

                                VerticalLayout pl = new VerticalLayout();
                                pl.setMargin(true);
                                Panel p = new Panel(
                                        "Wrapper panel (400px*400px)", pl);
                                p.setContent(new VerticalLayout());
                                p.setWidth("400px");
                                p.setHeight("400px");
                                pl.addComponent(c);
                                p.addStyleName("testablew");
                                p.addStyleName("testable");
                                return p;
                            }

                        };
                        t.addConfiguration(new Configuration("100%*100%") {
View Full Code Here

        setMainWindow(new LegacyWindow());

        VerticalLayout ol = new VerticalLayout();
        VerticalLayout pl = new VerticalLayout();
        pl.setMargin(true);
        Panel p = new Panel("Test", pl);
        pl.addComponent(new Label("Panel1"));
        p.setHeight("500px");
        p.setWidth("500px");
        p.setStyleName(Reindeer.PANEL_LIGHT);
        ol.addComponent(p);
        ol.addComponent(new Label("NextComponent"));

        getMainWindow().addComponent(ol);
View Full Code Here

    public void init() {
        LegacyWindow mainWindow = new LegacyWindow("Helloworld Application");

        VerticalLayout panelLayout = new VerticalLayout();
        panelLayout.setMargin(true);
        final Panel panel = new Panel("Test", panelLayout);
        final Button button = new Button("ablebutton");
        panelLayout.addComponent(button);

        CheckBox enable = new CheckBox("Toggle button enabled", true);
        enable.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                boolean enabled = (Boolean) event.getProperty().getValue();
                button.setEnabled(enabled);
                // button.requestRepaint();
            }
        });
        enable.setImmediate(true);

        CheckBox caption = new CheckBox("Toggle button caption", true);
        caption.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                button.setCaption(button.getCaption() + "+");
            }
        });
        caption.setImmediate(true);

        CheckBox visible = new CheckBox("Toggle panel visibility", true);
        visible.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                boolean visible = (Boolean) event.getProperty().getValue();

                panel.setVisible(visible);
            }
        });
        visible.setImmediate(true);

        CheckBox panelEnable = new CheckBox("Toggle panel enabled", true);
        panelEnable.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                boolean enabled = (Boolean) event.getProperty().getValue();
                panel.setEnabled(enabled);
            }
        });
        panelEnable.setImmediate(true);

        mainWindow.addComponent(enable);
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Panel

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.