}
}
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);
}
}
}
}
}