Search in sources :

Example 1 with FieldList

use of com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList in project sldeditor by robward-scisys.

the class ReadPanelConfig method parseSymbolTypeConfig.

/**
 * Parses the symbol type configuration.
 *
 * @param localisationClass the localisation class
 * @param panelId the panel id
 * @param valueObj the value obj
 * @return the symbol type config
 */
public static SymbolTypeConfig parseSymbolTypeConfig(Class<?> localisationClass, Class<?> panelId, XMLFieldConfigEnumValue valueObj) {
    SymbolTypeConfig config = new SymbolTypeConfig(panelId);
    String groupName = valueObj.getGroupName();
    boolean isSeparateGroup = valueObj.getSeparateGroup();
    if (groupName != null) {
        config.setGroupName(groupName);
    }
    config.setSeparateGroup(isSeparateGroup);
    for (XMLFieldConfigEnumValueItem itemObj : valueObj.getItem()) {
        config.addOption(itemObj.getId(), getLocalisedText(localisationClass, itemObj.getLabel()));
    }
    FieldList fieldList = valueObj.getFieldList();
    if (fieldList != null) {
        for (XMLFieldConfigEnumValueField field : fieldList.getField()) {
            config.addField(field.getId(), field.getEnabled());
        }
        for (XMLFieldConfigEnumValueGroup group : fieldList.getGroup()) {
            config.addGroup(group.getId(), group.getEnabled());
        }
    }
    return config;
}
Also used : XMLFieldConfigEnumValueField(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueField) XMLFieldConfigString(com.sldeditor.common.xml.ui.XMLFieldConfigString) SymbolTypeConfig(com.sldeditor.ui.detail.config.symboltype.SymbolTypeConfig) XMLFieldConfigEnumValueItem(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueItem) XMLFieldConfigEnumValueGroup(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueGroup) FieldList(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList)

Example 2 with FieldList

use of com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList in project sldeditor by robward-scisys.

the class SymbolTypeConfigParse method parseSymbolTypeConfig.

/**
 * Parses the symbol type configuration.
 *
 * @param localisationClass the localisation class
 * @param panelId the panel id
 * @param valueObj the value obj
 * @return the symbol type config
 */
public static SymbolTypeConfig parseSymbolTypeConfig(Class<?> localisationClass, Class<?> panelId, XMLFieldConfigEnumValue valueObj) {
    SymbolTypeConfig config = new SymbolTypeConfig(panelId);
    String groupName = valueObj.getGroupName();
    boolean isSeparateGroup = valueObj.getSeparateGroup();
    if (groupName != null) {
        config.setGroupName(groupName);
    }
    config.setSeparateGroup(isSeparateGroup);
    for (XMLFieldConfigEnumValueItem itemObj : valueObj.getItem()) {
        config.addOption(itemObj.getId(), InstantiateFields.getLocalisedText(localisationClass, itemObj.getLabel()));
    }
    FieldList fieldList = valueObj.getFieldList();
    if (fieldList != null) {
        for (XMLFieldConfigEnumValueField field : fieldList.getField()) {
            config.addField(field.getId(), field.getEnabled());
        }
        for (XMLFieldConfigEnumValueGroup group : fieldList.getGroup()) {
            config.addGroup(group.getId(), group.getEnabled());
        }
    }
    return config;
}
Also used : XMLFieldConfigEnumValueField(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueField) SymbolTypeConfig(com.sldeditor.ui.detail.config.symboltype.SymbolTypeConfig) XMLFieldConfigEnumValueItem(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueItem) XMLFieldConfigEnumValueGroup(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueGroup) FieldList(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList)

Example 3 with FieldList

use of com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList in project sldeditor by robward-scisys.

the class ReadMapUnits method parseSymbolTypeConfig.

/**
 * Parses the symbol type configuration.
 *
 * @param localisationClass the localisation class
 * @param panelId the panel id
 * @param valueObj the value obj
 * @return the symbol type config
 */
public static SymbolTypeConfig parseSymbolTypeConfig(Class<?> localisationClass, Class<?> panelId, XMLFieldConfigEnumValue valueObj) {
    SymbolTypeConfig config = new SymbolTypeConfig(panelId);
    String groupName = valueObj.getGroupName();
    boolean isSeparateGroup = valueObj.getSeparateGroup();
    if (groupName != null) {
        config.setGroupName(groupName);
    }
    config.setSeparateGroup(isSeparateGroup);
    for (XMLFieldConfigEnumValueItem itemObj : valueObj.getItem()) {
        config.addOption(itemObj.getId(), getLocalisedText(localisationClass, itemObj.getLabel()));
    }
    FieldList fieldList = valueObj.getFieldList();
    if (fieldList != null) {
        for (XMLFieldConfigEnumValueField field : fieldList.getField()) {
            config.addField(field.getId(), field.getEnabled());
        }
    }
    return config;
}
Also used : XMLFieldConfigEnumValueField(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueField) SymbolTypeConfig(com.sldeditor.ui.detail.config.symboltype.SymbolTypeConfig) XMLFieldConfigEnumValueItem(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueItem) FieldList(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList)

Example 4 with FieldList

use of com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList in project sldeditor by robward-scisys.

the class ReadMapUnits method parseSymbolTypeConfig.

/**
 * Parses the symbol type configuration.
 *
 * @param localisationClass the localisation class
 * @param panelId the panel id
 * @param valueObj the value obj
 * @return the symbol type config
 */
public static SymbolTypeConfig parseSymbolTypeConfig(Class<?> localisationClass, Class<?> panelId, XMLFieldConfigEnumValue valueObj) {
    SymbolTypeConfig config = new SymbolTypeConfig(panelId);
    String groupName = valueObj.getGroupName();
    boolean isSeparateGroup = valueObj.getSeparateGroup();
    if (groupName != null) {
        config.setGroupName(groupName);
    }
    config.setSeparateGroup(isSeparateGroup);
    for (XMLFieldConfigEnumValueItem itemObj : valueObj.getItem()) {
        config.addOption(itemObj.getId(), getLocalisedText(localisationClass, itemObj.getLabel()));
    }
    FieldList fieldList = valueObj.getFieldList();
    if (fieldList != null) {
        for (XMLFieldConfigEnumValueField field : fieldList.getField()) {
            config.addField(field.getId(), field.getEnabled());
        }
    }
    return config;
}
Also used : XMLFieldConfigEnumValueField(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueField) SymbolTypeConfig(com.sldeditor.ui.detail.config.symboltype.SymbolTypeConfig) XMLFieldConfigEnumValueItem(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueItem) FieldList(com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList)

Aggregations

FieldList (com.sldeditor.common.xml.ui.XMLFieldConfigEnumValue.FieldList)4 XMLFieldConfigEnumValueField (com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueField)4 XMLFieldConfigEnumValueItem (com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueItem)4 SymbolTypeConfig (com.sldeditor.ui.detail.config.symboltype.SymbolTypeConfig)4 XMLFieldConfigEnumValueGroup (com.sldeditor.common.xml.ui.XMLFieldConfigEnumValueGroup)2 XMLFieldConfigString (com.sldeditor.common.xml.ui.XMLFieldConfigString)1