}
private void loadButtons(Component[] component) {
for (int i = 0; i < component.length; i++) {
if (component[i] instanceof XButton) {
XButton button = (XButton) component[i];
String buttonName = button.getName();
String styleName = buttonName == null ? null : (String) pos.getAttribute("style", buttonName);
PosButtonWrapper wrapper = new PosButtonWrapper(button, styleName);
if (UtilValidate.isEmpty(buttonName)) {
wrapper.setEnabled(false);
} else {
XEventHelper.addActionHandler(pos, button, PosScreen.BUTTON_ACTION_METHOD);
loadedXButtons.put(button.getName(), wrapper);
}
}
if (component[i] instanceof Container) {
Component[] subComponents = ((Container) component[i]).getComponents();
loadButtons(subComponents);