use of com.sldeditor.common.xml.ui.XMLOptionGroup in project sldeditor by robward-scisys.
the class ReadPanelConfig method parseMultiOptionGroup.
/**
* Parses the multi option group.
*
* @param localisationClass the localisation class
* @param panelId the panel id
* @param xmlMultiGroupObj the xml multi group obj
* @return the multi option group
*/
private MultiOptionGroup parseMultiOptionGroup(Class<?> localisationClass, Class<?> panelId, XMLMultiOptionGroup xmlMultiGroupObj) {
MultiOptionGroup multiOptionGroupConfig = new MultiOptionGroup();
multiOptionGroupConfig.setId(xmlMultiGroupObj.getId());
multiOptionGroupConfig.setLabel(getLocalisedText(localisationClass, xmlMultiGroupObj.getLabel()));
multiOptionGroupConfig.setShowLabel(xmlMultiGroupObj.getShowLabel());
multiOptionGroupConfig.setOptional(xmlMultiGroupObj.getOption());
List<XMLOptionGroup> optionGroupList = xmlMultiGroupObj.getOptionGroup();
for (XMLOptionGroup xmlOptionGroup : optionGroupList) {
OptionGroup optionGroup = new OptionGroup();
optionGroup.setId(xmlOptionGroup.getId());
optionGroup.setLabel(getLocalisedText(localisationClass, xmlOptionGroup.getLabel()));
optionGroup.setShowLabel(xmlOptionGroup.getShowLabel());
List<XMLGroupConfig> xmlGroupConfigList = xmlOptionGroup.getGroup();
if (xmlGroupConfigList != null) {
for (XMLGroupConfig xmlGroupConfig : xmlGroupConfigList) {
GroupConfig groupConfig = parseGroup(localisationClass, panelId, xmlGroupConfig);
optionGroup.addGroup(groupConfig);
}
}
multiOptionGroupConfig.addGroup(optionGroup);
}
return multiOptionGroupConfig;
}
Aggregations