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

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


    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

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.