Package com.vaadin.ui.Layout

Examples of com.vaadin.ui.Layout.AlignmentHandler


        }
    }

    private void applyAlignment(AlignElement ae, ComponentContainer container) {
        if (container instanceof AlignmentHandler) {
            AlignmentHandler ah = (AlignmentHandler) container;
            for (WidgetElement awe : ae.getWidgets()) {
                Component widget = processWidgetElement(ae, awe, container);
                if (widget != null) {
                    if (XmlConstants.ALIGN_POS_CENTER_TOP.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, TOP_CENTER);
                    } else if (XmlConstants.ALIGN_POS_LEFT_TOP.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, TOP_LEFT);
                    } else if (XmlConstants.ALIGN_POS_RIGHT_TOP.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, TOP_RIGHT);
                    } else if (XmlConstants.ALIGN_POS_CENTER_MIDDLE.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, MIDDLE_CENTER);
                    } else if (XmlConstants.ALIGN_POS_LEFT_MIDDLE.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, MIDDLE_LEFT);
                    } else if (XmlConstants.ALIGN_POS_RIGHT_MIDDLE.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, MIDDLE_RIGHT);
                    } else if (XmlConstants.ALIGN_POS_CENTER_BOTTOM.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, BOTTOM_CENTER);
                    } else if (XmlConstants.ALIGN_POS_LEFT_BOTTOM.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, BOTTOM_LEFT);
                    } else if (XmlConstants.ALIGN_POS_RIGHT_BOTTOM.equals(ae.getPos())) {
                        ah.setComponentAlignment(widget, BOTTOM_RIGHT);
                    }
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.vaadin.ui.Layout.AlignmentHandler

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.