Examples of HorizontalLayoutData


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

        addRelativePositoning(container);
    }

    @Override
    public void add(Widget widget) {
        addWidget(widget, new HorizontalLayoutData("*"));
    }
View Full Code Here

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

    public void add(Widget widget) {
        addWidget(widget, new HorizontalLayoutData("*"));
    }

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

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

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

    public Widget addGap(String width) {
        Label label = new Label();
        addWidget(label, new HorizontalLayoutData(width));
        return label;
    }
View Full Code Here

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

            for (Element element : panel.elements) {
                if (!isVisible(element.getFirstChildElement())) {
                    i++;
                    continue;
                }
                HorizontalLayoutData data = panel.layoutDatas.get(i);
                expandToFitParentVertically(element);
                String width = data.getWidth();
                if (!"*".equals(width)) {
                    setElementWidth(element, width);
                    int offsetWidth = LayoutUtils.getOffsetWidth(element);
                    usedWidth += offsetWidth;
                } else {
                    dynamicElementCount++;
                }
                i++;
            }

            int dynamicWidth = containerWidth - usedWidth;
            int width = (dynamicElementCount > 0) ? dynamicWidth / dynamicElementCount : 0;
            if (width < 0) {
                width = 0;
            }
            int left = 0;
            i = 0;
            for (Element element : panel.elements) {
                if (!isVisible(element.getFirstChildElement())) {
                    i++;
                    continue;
                }
                setLeft(element, left + "px");
                HorizontalLayoutData data = panel.layoutDatas.get(i);
                if ("*".equals(data.getWidth())) {
                    setElementWidth(element, width + "px");
                    left += width;
                } else {
                    int currentWidth = LayoutUtils.getOffsetWidth(element);
                    left += currentWidth;
View Full Code Here

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

        addRelativePositoning(container);
    }

    @Override
    public void add(Widget widget) {
        addWidget(widget, new HorizontalLayoutData("*"));
    }
View Full Code Here

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

    public void add(Widget widget) {
        addWidget(widget, new HorizontalLayoutData("*"));
    }

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

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

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

    public Widget addGap(String width) {
        Label label = new Label();
        addWidget(label, new HorizontalLayoutData(width));
        return label;
    }
View Full Code Here

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

            for (Element element : panel.elements) {
                if (!isVisible(element.getFirstChildElement())) {
                    i++;
                    continue;
                }
                HorizontalLayoutData data = panel.layoutDatas.get(i);
                expandToFitParentVertically(element);
                String width = data.getWidth();
                if (!"*".equals(width)) {
                    setElementWidth(element, width);
                    int offsetWidth = LayoutUtils.getOffsetWidth(element);
                    usedWidth += offsetWidth;
                } else {
                    dynamicElementCount++;
                }
                i++;
            }

            int dynamicWidth = containerWidth - usedWidth;
            int width = (dynamicElementCount > 0) ? dynamicWidth / dynamicElementCount : 0;
            if (width < 0) {
                width = 0;
            }
            int left = 0;
            i = 0;
            for (Element element : panel.elements) {
                if (!isVisible(element.getFirstChildElement())) {
                    i++;
                    continue;
                }
                setLeft(element, left + "px");
                HorizontalLayoutData data = panel.layoutDatas.get(i);
                if ("*".equals(data.getWidth())) {
                    setElementWidth(element, width + "px");
                    left += width;
                } else {
                    int currentWidth = LayoutUtils.getOffsetWidth(element);
                    left += currentWidth;
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.