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

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


    public FixedHorizontalPanelSamplePane() {

        FixedHorizontalPanel fhp = new FixedHorizontalPanel();
        DOM.setStyleAttribute(fhp.getElement(), "borderBottom", "1px solid blue");
        fhp.addWidget(createContent("width: 70px", "#CCFFCC", "BLUE"), new HorizontalLayoutData().setWidth("70px"));
        Widget content = createContent("width: 50%", "#FFFBA3", "GREEN");
        content.setVisible(true);
        fhp.addWidget(content, new HorizontalLayoutData().setWidth("50%"));
        fhp.addWidget(createContent("width: *", "#FFC0CB", "black"));
        fhp.addWidget(createContent("width: 50px", "#E6E6FA", "yellow"), new HorizontalLayoutData("50px"));
        fhp.addWidget(createContent("width: *", "orange", "cyan"));

        FitPanel panel = new FitPanel();
        panel.setSize("100%", "400px");

View Full Code Here


    public HorizontalLayoutSample() {

        HorizontalLayout layout = new HorizontalLayout();
        layout.getElement().getStyle().setProperty("borderBottom", "1px solid blue");
        layout.addWidget(createContent("width: 70px", "#CCFFCC", "BLUE"), new HorizontalLayoutData().setWidth("70px"));
        Widget content = createContent("width: 50%", "#FFFBA3", "GREEN");
        content.setVisible(true);
        layout.addWidget(content, new HorizontalLayoutData().setWidth("50%"));
        layout.addWidget(createContent("width: *", "#FFC0CB", "black"));
        layout.addWidget(createContent("width: 50px", "#E6E6FA", "yellow"), new HorizontalLayoutData("50px"));
        layout.addWidget(createContent("width: *", "orange", "cyan"));

        initWidget(layout);
    }
View Full Code Here

        addRelativePositoning(container);
    }

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

    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

        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

            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

        addRelativePositoning(container);
    }

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

    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

        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

            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

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

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.