Examples of HorizontalSplitPanel


Examples of com.vaadin.ui.HorizontalSplitPanel

        label = new Label(
                "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent porttitor porta lacus. Nulla tellus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin mollis turpis in mauris faucibus posuere. Nullam rutrum, nisi a fermentum tempus, lacus metus rutrum massa, a condimentum mauris justo a tortor. Mauris aliquet, ante quis ultricies posuere, sapien libero laoreet sem, a accumsan diam metus sed elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Curabitur vehicula metus nec turpis dignissim cursus. Suspendisse potenti. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nullam feugiat orci eget risus. Vestibulum at sem. ");
        label.setWidth("100%");
        top.addComponent(label);
        split = new HorizontalSplitPanel();
        split.setHeight("100%");
        Embedded image = new Embedded("An image", new ExternalResource(
                "http://dev.itmill.com/chrome/site/toolkit-logo.png"));
        image.setWidth("100%");
        root.addComponent(split);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

        vert.setHeight("50px");
        vert.setId("layout" + debugIdCounter++);

        addComponent(vert);

        HorizontalSplitPanel horiz = new HorizontalSplitPanel();
        horiz.setSplitPosition(50);
        horiz.setFirstComponent(new Label("Some content 1"));
        horiz.setSecondComponent(new Label("Some content 2"));
        horiz.setIcon(new ThemeResource(parent.ICON_URL));
        horiz.setCaption("HorizSplitPan");
        horiz.setId("layout" + debugIdCounter++);

        addComponent(horiz);

        VerticalSplitPanel smallSplitPanel = new VerticalSplitPanel();
        smallSplitPanel.setCaption("SmallVertSplitPan");
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    @Override
    protected void setup() {
        getLayout().setSizeFull();

        HorizontalSplitPanel split1 = new HorizontalSplitPanel();
        split1.setSizeFull();
        addComponent(split1);

        VerticalLayout left = new VerticalLayout();
        left.setSizeFull();
        split1.setFirstComponent(left);

        left.setSpacing(true);
        left.setMargin(true);

        left.addComponent(new Label("<h2>Layout resize test</h2>",
                ContentMode.HTML));

        Button resize = new Button("Resize to 700x400",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        event.getButton()
                                .getUI()
                                .getPage()
                                .getJavaScript()
                                .execute(
                                        "setTimeout(function() {window.resizeTo(700,400)}, 500)");
                    }
                });
        left.addComponent(resize);

        resize = new Button("Resize to 900x600", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                event.getButton()
                        .getUI()
                        .getPage()
                        .getJavaScript()
                        .execute(
                                "setTimeout(function() {window.resizeTo(900,600)}, 500)");
            }
        });
        left.addComponent(resize);

        left.addComponent(new Label(
                "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin vel ante a orci tempus eleifend ut et magna. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus luctus urna sed urna ultricies."));

        Table table1 = new Table();
        table1.setSizeFull();
        table1.addContainerProperty("Column", String.class, "");
        for (int i = 1; i <= 100; i++) {
            table1.addItem(new Object[] { "Value " + i }, i);
        }
        left.addComponent(table1);
        left.setExpandRatio(table1, 1);

        VerticalSplitPanel split2 = new VerticalSplitPanel();
        split2.setSizeFull();
        split1.setSecondComponent(split2);

        Table table2 = new Table();
        table2.setSizeFull();
        table2.addContainerProperty("Column 1", String.class, "");
        table2.addContainerProperty("Column 2", String.class, "");
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    public void init(VaadinRequest request) {

        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

Examples of com.vaadin.ui.HorizontalSplitPanel

        TextArea ta = new TextArea();
        ta.setValue("When resizing the layout this text area should also get resized");
        ta.setSizeFull();
        al.addComponent(ta, "left: 10px; right: 10px; top: 10px; bottom: 10px;");

        HorizontalSplitPanel horizPanel = new HorizontalSplitPanel();
        horizPanel.setSizeFull();
        horizPanel.setFirstComponent(al);

        VerticalSplitPanel vertPanel = new VerticalSplitPanel();
        vertPanel.setSizeFull();
        vertPanel.setFirstComponent(horizPanel);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

         * That covers the top bar. Now let's move on to the sidebar and track
         * listing
         */

        // We'll need one splitpanel to separate the sidebar and track listing
        HorizontalSplitPanel bottom = new HorizontalSplitPanel();
        rootLayout.addComponent(bottom);

        // The splitpanel is by default 100% x 100%, but we'll need to adjust
        // our main window layout to accomodate the height
        rootLayout.setExpandRatio(bottom, 1.0F);

        // Give the sidebar less space than the listing
        bottom.setSplitPosition(200, Sizeable.UNITS_PIXELS);

        // Let's add some content to the sidebar
        // First, we need a layout to but all components in
        VerticalLayout sidebar = new VerticalLayout();
        sidebar.setSizeFull();
        bottom.setFirstComponent(sidebar);

        /*
         * Then we need some labels and buttons, and an album cover image The
         * labels and buttons go into their own vertical layout, since we want
         * the 'sidebar' layout to be expanding (cover image in the bottom).
         * VerticalLayout is by default 100% wide.
         */
        VerticalLayout selections = new VerticalLayout();
        Label library = new Label("Library");
        Button music = new NativeButton("Music");
        music.setWidth("100%");

        Label store = new Label("Store");
        Button vaadinTunesStore = new NativeButton("VaadinTunes Store");
        vaadinTunesStore.setWidth("100%");
        Button purchased = new NativeButton("Purchased");
        purchased.setWidth("100%");

        Label playlists = new Label("Playlists");
        Button genius = new NativeButton("Geniues");
        genius.setWidth("100%");
        Button recent = new NativeButton("Recently Added");
        recent.setWidth("100%");

        // Lets add them to the 'selections' layout
        selections.addComponent(library);
        selections.addComponent(music);
        selections.addComponent(store);
        selections.addComponent(vaadinTunesStore);
        selections.addComponent(purchased);
        selections.addComponent(playlists);
        selections.addComponent(genius);
        selections.addComponent(recent);

        // Then add the selections to the sidebar, and set it expanding
        sidebar.addComponent(selections);
        sidebar.setExpandRatio(selections, 1.0F);

        // Then comes the cover artwork (we'll add the actual image in the
        // themeing section)
        Embedded cover = new Embedded("Currently Playing");
        sidebar.addComponent(cover);

        /*
         * And lastly, we need the track listing table It should fill the whole
         * left side of our bottom layout
         */
        Table listing = new Table();
        listing.setSizeFull();
        listing.setSelectable(true);
        bottom.setSecondComponent(listing);

        // Add the table headers
        listing.addContainerProperty("Name", String.class, "");
        listing.addContainerProperty("Time", String.class, "0:00");
        listing.addContainerProperty("Artist", String.class, "");
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    }

    @Override
    public void init() {
        LegacyWindow mainWindow = new LegacyWindow("MenuBar in SplitPanel",
                new HorizontalSplitPanel());
        VerticalLayout left = new VerticalLayout();
        mainWindow.addComponent(left);
        left.setSizeFull();
        MenuBar menu = new MenuBar();
        menu.setWidth("100%");
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

    @Override
    public void init() {
        LegacyWindow main = new LegacyWindow("The Main Window");
        main.getContent().setSizeFull();
        setMainWindow(main);
        HorizontalSplitPanel sp = new HorizontalSplitPanel();
        main.addComponent(sp);
    }
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

        wrap.addComponent(getSplit(true, "large"));
        wrap.addComponent(getSplit(false, "large"));
    }

    private AbstractSplitPanel getSplit(boolean horizontal, String style) {
        AbstractSplitPanel split = horizontal ? new HorizontalSplitPanel()
                : new VerticalSplitPanel();

        if (style != null) {
            split.addStyleName(style);
        }
        split.setWidth("300px");
        split.setHeight("300px");

        AbstractSplitPanel content = horizontal ? new VerticalSplitPanel()
                : new HorizontalSplitPanel();
        content.addComponent(new Label("First"));
        content.addComponent(new Label("Second"));
        split.addComponent(content);

        content = horizontal ? new VerticalSplitPanel()
                : new HorizontalSplitPanel();
        content.addComponent(new Label("First"));
        split.addComponent(content);

        // Inception level nesting, but we need to test that the first level
        // styles don't leak to a nested split panel with the same orientation
        AbstractSplitPanel content2 = horizontal ? new HorizontalSplitPanel()
                : new VerticalSplitPanel();
        content2.addComponent(new Label("First"));
        content2.addComponent(new Label("Second"));
        content.addComponent(content2);
View Full Code Here

Examples of com.vaadin.ui.HorizontalSplitPanel

        return "SplitPanel splitter is effectively a 1px wide target after unlocking previously locked splitter.";
    }

    @Override
    protected void setup() {
        final HorizontalSplitPanel split = new HorizontalSplitPanel();
        split.setWidth("200px");
        split.setHeight("200px");
        split.setLocked(true);
        Panel p = buildPanel("Left");
        p.setSizeFull();
        split.addComponent(p);
        p = buildPanel("Right");
        p.setSizeFull();
        split.addComponent(p);

        final VerticalSplitPanel split2 = new VerticalSplitPanel();
        split2.setWidth("200px");
        split2.setHeight("200px");
        split2.setLocked(true);
        p = buildPanel("Top");
        p.setSizeFull();
        split2.addComponent(p);
        p = buildPanel("Bottom");
        p.setSizeFull();
        split2.addComponent(p);

        getLayout().addComponent(
                new Button("Unlock", new Button.ClickListener() {

                    @Override
                    public void buttonClick(ClickEvent event) {
                        split.setLocked(false);
                        split2.setLocked(false);
                        getMainWindow().showNotification(
                                "Try moving split. Then reload page.",
                                Notification.TYPE_WARNING_MESSAGE);
                        getLayout().removeComponent(event.getButton());
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.