Package org.gwtoolbox.widget.client.panel.layout

Examples of org.gwtoolbox.widget.client.panel.layout.VerticalLayoutData


    public VerticalLayoutSample() {

        VerticalLayout layout = new VerticalLayout();
        DOM.setStyleAttribute(layout.getElement(), "borderBottom", "1px solid blue");
        layout.addWidget(createContent("height: 70px", "#CCFFCC", "BLUE"), new VerticalLayoutData().setHeight("70px"));
        Widget content = createContent("height: 50%", "#FFFBA3", "GREEN");
        content.setVisible(true);
        layout.addWidget(content, new VerticalLayoutData().setHeight("50%"));
        layout.addWidget(createContent("height: *", "#FFC0CB", "black"));

        initWidget(layout);
    }
View Full Code Here


    public FixedVerticalPanelSamplePane() {

        FixedVerticalPanel svp = new FixedVerticalPanel();
        DOM.setStyleAttribute(svp.getElement(), "borderBottom", "1px solid blue");
        svp.addWidget(createContent("height: 70px", "#CCFFCC", "BLUE"), new VerticalLayoutData().setHeight("70px"));
        Widget content = createContent("height: 50%", "#FFFBA3", "GREEN");
        content.setVisible(true);
        svp.addWidget(content, new VerticalLayoutData().setHeight("50%"));
        svp.addWidget(createContent("height: *", "#FFC0CB", "black"));
//        svp.addWidget(createContent("height: 50px", "#E6E6FA"), new VerticalLayoutData().setHeight("50px"));
//        svp.addWidget(createContent("height: *", "orange"));

        FitPanel panel = new FitPanel();
View Full Code Here

        final DoubleHorizontalSplitPanel hsp = new DoubleHorizontalSplitPanel();
        hsp.setLeftWidget(addScroll(createContent(createVeryLongText(), "white")));
        hsp.setRightWidget(addScroll(createContent(createVeryLongText(), "white")));

        FixedVerticalPanel vp = new FixedVerticalPanel();
        vp.addWidget(createContent("Console", "green"), new VerticalLayoutData().setHeight("25px"));
        vp.addWidget(createContent(createVeryLongText(), "orange"), new VerticalLayoutData().setExpandToFit(true).setOverflow("auto"));

        final SimpleVerticalSplitPanel vsp = new SimpleVerticalSplitPanel();
        vsp.setTopWidget(hsp);
        vsp.setBottomWidget(vp);
        vsp.setSplitPosition("75%");
View Full Code Here

            }
        });

        if (fixedSize) {
            final FixedVerticalPanel main = new FixedVerticalPanel();
            main.addWidget(tabBar, new VerticalLayoutData().setHeight("27px"));
            main.addWidget(deckPanel, new VerticalLayoutData().setHeight("*").setExpandToFit(true).setOverflow("hidden"));
            tabBarVisibilitySetter = new ValueSetter<Boolean>() {
                public void set(Boolean visible) {
                    setVisible(main.getWidgetContainer(tabBar), visible);
                }
            };
View Full Code Here

        addRelativePositoning(container);
    }

    @Override
    public void add(Widget widget) {
        addWidget(widget, new VerticalLayoutData().setHeight("*").setOverflow("visible"));
    }
View Full Code Here

    public void add(Widget widget) {
        addWidget(widget, new VerticalLayoutData().setHeight("*").setOverflow("visible"));
    }

    public void addWidget(Widget widget) {
        VerticalLayoutData data = new VerticalLayoutData();
        addWidget(widget, data);
    }
View Full Code Here

        addWidget(elements.size(), widget, data);
    }

    public Widget addGap(String height) {
        Label label = new Label();
        addWidget(label, new VerticalLayoutData().setHeight(height));
        return label;
    }
View Full Code Here

            for (Element element : panel.elements) {
                if (!isVisible(element.getFirstChildElement())) {
                    i++;
                    continue;
                }
                VerticalLayoutData data = panel.layoutDatas.get(i);
                expandToFitParentHorizontally(element);
                String height = data.getHeight();
                if (!"*".equals(height)) {
                    setElementHeight(element, height);
                    int offsetHeight = LayoutUtils.getOffsetHeight(element);
                    usedHeight += offsetHeight;
                } else {
                    dynamicElementCount++;
                }
                i++;
            }

            int dynamicHeight = containerHeight - usedHeight;
            int height = (dynamicElementCount > 0) ? dynamicHeight / dynamicElementCount : 0;
            if (height < 0) {
                height = 0;
            }
            int top = 0;
            i = 0;
            for (Element element : panel.elements) {
                if (!isVisible(element.getFirstChildElement())) {
                    i++;
                    continue;
                }
                setTop(element, top + "px");
                VerticalLayoutData data = panel.layoutDatas.get(i);
                if ("*".equals(data.getHeight())) {
                    setElementHeight(element, height + "px");
                    top += height;
                } else {
                    int currentHeight = LayoutUtils.getOffsetHeight(element);
                    top += currentHeight;
View Full Code Here

        titleBar = new TitleBar(title, image);
        titleBar.setSize("100%", "100%");
        SimplePanel sp = new SimplePanel();
        sp.setWidget(titleBar);
        main.addWidget(sp, new VerticalLayoutData().setHeight("28px"));

        contentPane = new SimplePanel();
        contentPane.setStylePrimaryName("Content");
        LayoutUtils.expandToFitParent(contentPane.getElement());

        contentPaddingTop = new WidgetStyleAttributeSetter(contentPane, "paddingTop");
        contentPaddingRight = new WidgetStyleAttributeSetter(contentPane, "paddingRight");
        contentPaddingBottom = new WidgetStyleAttributeSetter(contentPane, "paddingBottom");
        contentPaddingLeft = new WidgetStyleAttributeSetter(contentPane, "paddingLeft");

        contentVisibilty = new ElementVisibilitySetter(contentPane.getElement());

        sp = new SimplePanel();
        sp.setWidget(contentPane);
        main.addWidget(sp, new VerticalLayoutData("*"));

        return main;
    }
View Full Code Here

        addRelativePositoning(container);
    }

    @Override
    public void add(Widget widget) {
        addWidget(widget, new VerticalLayoutData().setHeight("*").setOverflow("visible"));
    }
View Full Code Here

TOP

Related Classes of org.gwtoolbox.widget.client.panel.layout.VerticalLayoutData

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.