Examples of VerticalSplitPanel


Examples of com.vaadin.ui.VerticalSplitPanel

        rootLayout = new VerticalLayout();
        main.setContent(rootLayout);

        rootLayout.addComponent(new Label("header"));

        firstLevelSplit = new VerticalSplitPanel();

        final HorizontalSplitPanel secondSplitPanel = new HorizontalSplitPanel();
        secondSplitPanel.setFirstComponent(new Label("left"));

        final VerticalLayout topRight = new VerticalLayout();
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

        gl.addComponent(new Label("Some content"));
        gl.setId("layout" + debugIdCounter++);

        addComponent(gl);

        VerticalSplitPanel vert = new VerticalSplitPanel();
        vert.setCaption("VertSplitPan");
        vert.setFirstComponent(new Label("Some content 1"));
        vert.setSecondComponent(new Label("Some content 2"));
        vert.setComponentError(new UserError("A error message..."));
        vert.setSplitPosition(50);
        vert.setEnabled(false);
        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");
        smallSplitPanel.setFirstComponent(new Label("Some content 1"));
        smallSplitPanel.setSecondComponent(new Label("Some content 2"));
        smallSplitPanel.setComponentError(new UserError("A error message..."));
        smallSplitPanel.setSplitPosition(50);
        smallSplitPanel.addStyleName(Reindeer.SPLITPANEL_SMALL);
        smallSplitPanel.setEnabled(false);
        smallSplitPanel.setHeight("50px");
        smallSplitPanel.setId("layout" + debugIdCounter++);
        addComponent(smallSplitPanel);

        String customLayoutSrc = "<html><div location='pos1' class='customclass'> </div></html>";

        CustomLayout custom;
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

        final LegacyWindow mainWin = new LegacyWindow(
                "Test app to break layout fuction in IE7");
        setMainWindow(mainWin);

        VerticalSplitPanel sp = new VerticalSplitPanel();

        sp.setFirstComponent(new Label("First"));

        VerticalLayout el = new VerticalLayout();

        sp.setSecondComponent(el);
        el.setMargin(true);
        el.setSizeFull();

        el.addComponent(new Label("Top"));
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

            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, "");
        table2.addContainerProperty("Column 3", String.class, "");
        table2.addContainerProperty("Column 4", String.class, "");
        for (int i = 1; i <= 100; i++) {
            table2.addItem(new Object[] { "Value " + i, "Value " + i,
                    "Value " + i, "Value " + i }, i);
        }
        split2.setFirstComponent(table2);

        VerticalLayout rows = new VerticalLayout();
        rows.setWidth("100%");
        rows.setSpacing(true);
        rows.setMargin(true);
        for (int i = 1; i <= 100; i++) {
            rows.addComponent(getRow(i));
        }
        split2.setSecondComponent(rows);
    }
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

        label.setWidth(null);
        l.addComponent(label);
        final HorizontalSplitPanel sp = new HorizontalSplitPanel();
        sp.setWidth("100%");
        sp.setHeight("100px");
        final VerticalSplitPanel sp2 = new VerticalSplitPanel();
        sp2.setSizeFull();
        sp.setSecondComponent(sp2);
        l.addComponent(sp);

        label = new Label(
                "Small Style<br />(<code>LiferayTheme.SPLITPANEL_SMALL</code>)",
                ContentMode.HTML);
        label.setWidth(null);
        l.addComponent(label);

        final HorizontalSplitPanel sp3 = new HorizontalSplitPanel();
        sp3.setStyleName(LiferayTheme.SPLITPANEL_SMALL);
        sp3.setWidth("100%");
        sp3.setHeight("100px");
        final VerticalSplitPanel sp4 = new VerticalSplitPanel();
        sp4.setStyleName(LiferayTheme.SPLITPANEL_SMALL);
        sp4.setSizeFull();
        sp3.setSecondComponent(sp4);
        l.addComponent(sp3);

        lockCheckBox.addListener(new Property.ValueChangeListener() {

            @Override
            public void valueChange(ValueChangeEvent event) {
                sp.setLocked((Boolean) event.getProperty().getValue());
                sp2.setLocked((Boolean) event.getProperty().getValue());
                sp3.setLocked((Boolean) event.getProperty().getValue());
                sp4.setLocked((Boolean) event.getProperty().getValue());
            }
        });

        return l;
    }
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

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

        VerticalSplitPanel vertPanel = new VerticalSplitPanel();
        vertPanel.setSizeFull();
        vertPanel.setFirstComponent(horizPanel);

        addComponent(vertPanel);

    }
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

        tabs.addComponent(horizontalSplitsLayout);

        HorizontalLayout verticalSplitsLayout = new HorizontalLayout();
        verticalSplitsLayout.setCaption("Vertical splits");

        VerticalSplitPanel percentagePositionWithPercentageLimitsVertical = new VerticalSplitPanel();
        percentagePositionWithPercentageLimitsVertical.setMinSplitPosition(10,
                Sizeable.UNITS_PERCENTAGE);
        percentagePositionWithPercentageLimitsVertical.setMaxSplitPosition(80,
                Sizeable.UNITS_PERCENTAGE);
        percentagePositionWithPercentageLimitsVertical
                .setFirstComponent(new Label("Min 10 % - 50 % position"));
        percentagePositionWithPercentageLimitsVertical
                .setSecondComponent(new Label("Max 80 %"));
        percentagePositionWithPercentageLimitsVertical.setSplitPosition(50,
                Sizeable.UNITS_PERCENTAGE);
        verticalSplitsLayout
                .addComponent(percentagePositionWithPercentageLimitsVertical);

        VerticalSplitPanel pixelPositionWithPercentageLimitsVertical = new VerticalSplitPanel();
        pixelPositionWithPercentageLimitsVertical.setMinSplitPosition(10,
                Sizeable.UNITS_PERCENTAGE);
        pixelPositionWithPercentageLimitsVertical.setMaxSplitPosition(80,
                Sizeable.UNITS_PERCENTAGE);
        pixelPositionWithPercentageLimitsVertical.setFirstComponent(new Label(
                "Min 10 % - 400 px position"));
        pixelPositionWithPercentageLimitsVertical.setSecondComponent(new Label(
                "Max 80 %"));
        pixelPositionWithPercentageLimitsVertical.setSplitPosition(400,
                Sizeable.UNITS_PIXELS);
        verticalSplitsLayout
                .addComponent(pixelPositionWithPercentageLimitsVertical);

        VerticalSplitPanel pixelPositionWithPixelLimitsVertical = new VerticalSplitPanel();
        pixelPositionWithPixelLimitsVertical.setMinSplitPosition(100,
                Sizeable.UNITS_PIXELS);
        pixelPositionWithPixelLimitsVertical.setMaxSplitPosition(450,
                Sizeable.UNITS_PIXELS);
        pixelPositionWithPixelLimitsVertical.setFirstComponent(new Label(
                "Min 100 px - 400 px position"));
        pixelPositionWithPixelLimitsVertical.setSecondComponent(new Label(
                "Max 450 px"));
        pixelPositionWithPixelLimitsVertical.setSplitPosition(400,
                Sizeable.UNITS_PIXELS);
        verticalSplitsLayout.addComponent(pixelPositionWithPixelLimitsVertical);

        VerticalSplitPanel percentagePositionWithPixelLimitsVertical = new VerticalSplitPanel();
        percentagePositionWithPixelLimitsVertical.setMinSplitPosition(100,
                Sizeable.UNITS_PIXELS);
        percentagePositionWithPixelLimitsVertical.setMaxSplitPosition(450,
                Sizeable.UNITS_PIXELS);
        percentagePositionWithPixelLimitsVertical.setFirstComponent(new Label(
                "Min 100 px - 30 % position"));
        percentagePositionWithPixelLimitsVertical.setSecondComponent(new Label(
                "Max 450 px"));
        percentagePositionWithPixelLimitsVertical.setSplitPosition(30,
                Sizeable.UNITS_PERCENTAGE);
        verticalSplitsLayout
                .addComponent(percentagePositionWithPixelLimitsVertical);

        VerticalSplitPanel percentagePositionWithPercentageLimitsVerticalReversed = new VerticalSplitPanel();
        percentagePositionWithPercentageLimitsVerticalReversed
                .setMinSplitPosition(10, Sizeable.UNITS_PERCENTAGE);
        percentagePositionWithPercentageLimitsVerticalReversed
                .setMaxSplitPosition(80, Sizeable.UNITS_PERCENTAGE);
        percentagePositionWithPercentageLimitsVerticalReversed
                .setFirstComponent(new Label(
                        "Max 80 % - Reversed 50 % position"));
        percentagePositionWithPercentageLimitsVerticalReversed
                .setSecondComponent(new Label("Min 10 %"));
        percentagePositionWithPercentageLimitsVerticalReversed
                .setSplitPosition(50, Sizeable.UNITS_PERCENTAGE, true);
        verticalSplitsLayout
                .addComponent(percentagePositionWithPercentageLimitsVerticalReversed);

        VerticalSplitPanel pixelPositionWithPercentageLimitsVerticalReversed = new VerticalSplitPanel();
        pixelPositionWithPercentageLimitsVerticalReversed.setMinSplitPosition(
                10, Sizeable.UNITS_PERCENTAGE);
        pixelPositionWithPercentageLimitsVerticalReversed.setMaxSplitPosition(
                80, Sizeable.UNITS_PERCENTAGE);
        pixelPositionWithPercentageLimitsVerticalReversed
                .setFirstComponent(new Label(
                        "Max 80 % - Reversed 400 px position"));
        pixelPositionWithPercentageLimitsVerticalReversed
                .setSecondComponent(new Label("Min 10 %"));
        pixelPositionWithPercentageLimitsVerticalReversed.setSplitPosition(400,
                Sizeable.UNITS_PIXELS, true);
        verticalSplitsLayout
                .addComponent(pixelPositionWithPercentageLimitsVerticalReversed);

        VerticalSplitPanel pixelPositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
        pixelPositionWithPixelLimitsVerticalReversed.setMinSplitPosition(100,
                Sizeable.UNITS_PIXELS);
        pixelPositionWithPixelLimitsVerticalReversed.setMaxSplitPosition(400,
                Sizeable.UNITS_PIXELS);
        pixelPositionWithPixelLimitsVerticalReversed
                .setFirstComponent(new Label(
                        "Max 400 px - Reversed 300 px position"));
        pixelPositionWithPixelLimitsVerticalReversed
                .setSecondComponent(new Label("Min 100 px"));
        pixelPositionWithPixelLimitsVerticalReversed.setSplitPosition(300,
                Sizeable.UNITS_PIXELS, true);
        verticalSplitsLayout
                .addComponent(pixelPositionWithPixelLimitsVerticalReversed);

        VerticalSplitPanel percentagePositionWithPixelLimitsVerticalReversed = new VerticalSplitPanel();
        percentagePositionWithPixelLimitsVerticalReversed.setMinSplitPosition(
                100, Sizeable.UNITS_PIXELS);
        percentagePositionWithPixelLimitsVerticalReversed.setMaxSplitPosition(
                400, Sizeable.UNITS_PIXELS);
        percentagePositionWithPixelLimitsVerticalReversed
                .setFirstComponent(new Label(
                        "Max 400 px - Reversed 30 % position"));
        percentagePositionWithPixelLimitsVerticalReversed
                .setSecondComponent(new Label("Min 100 px"));
        percentagePositionWithPixelLimitsVerticalReversed.setSplitPosition(30,
                Sizeable.UNITS_PERCENTAGE, true);
        verticalSplitsLayout
                .addComponent(percentagePositionWithPixelLimitsVerticalReversed);

        tabs.addComponent(verticalSplitsLayout);
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

        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);

        return split;
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

        TextArea area = new TextArea("");
        area.setSizeFull();
        hsplit.addComponent(area);

        final VerticalSplitPanel vsplit = new VerticalSplitPanel();
        vsplit.setSizeFull();
        vsplit.setImmediate(true);
        vsplit.setSplitPosition(10, Sizeable.UNITS_PERCENTAGE, vsplitReversed);
        vsplit.addListener(new SplitterClickListener() {
            @Override
            public void splitterClick(SplitterClickEvent event) {
                getMainWindow().showNotification("Vertical Splitter Clicked");
            }
        });
        hsplit.addComponent(vsplit);

        addComponent(hsplit);

        area = new TextArea("");
        area.setSizeFull();
        vsplit.addComponent(area);

        area = new TextArea("");
        area.setSizeFull();
        vsplit.addComponent(area);

        HorizontalLayout buttons = new HorizontalLayout();
        buttons.setSpacing(true);

        buttons.addComponent(new Button("Swap horizontal positioning",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        hsplitReversed = !hsplitReversed;
                        hsplit.setSplitPosition(100, Sizeable.UNITS_PIXELS,
                                hsplitReversed);

                    }
                }));

        buttons.addComponent(new Button("Swap vertical positioning",
                new Button.ClickListener() {
                    @Override
                    public void buttonClick(ClickEvent event) {
                        vsplitReversed = !vsplitReversed;
                        vsplit.setSplitPosition(10, Sizeable.UNITS_PERCENTAGE,
                                vsplitReversed);
                    }
                }));

        addComponent(buttons);
View Full Code Here

Examples of com.vaadin.ui.VerticalSplitPanel

            BasicEvent.class);

    @SuppressWarnings("deprecation")
    @Override
    protected void init(VaadinRequest request) {
        VerticalSplitPanel content = new VerticalSplitPanel();
        content.setSizeFull();
        setContent(content);

        // Create Calendar
        calendar = new Calendar();
        calendar.setImmediate(true);
        calendar.setSizeFull();
        calendar.setContainerDataSource(events);
        calendar.setStartDate(new Date(100, 1, 1));
        calendar.setEndDate(new Date(100, 2, 1));

        content.addComponent(calendar);

        // Add event table connected to same data source
        table = createTable();
        table.setContainerDataSource(events);
        table.setVisibleColumns(new Object[] { "caption", "description",
                "start", "end" });
        content.addComponent(table);
    }
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.