use of org.opengis.style.ContrastMethod in project sldeditor by robward-scisys.
the class RasterSymbolizerDetails method populateContrastMethod.
/**
* Populate contrast method.
*
* @param contrastEnhancement the contrast enhancement
* @param contrastMethodGroup the contrast method group
*/
private void populateContrastMethod(ContrastEnhancement contrastEnhancement, GroupIdEnum contrastMethodGroup) {
GroupConfigInterface group = getGroup(contrastMethodGroup);
if (group != null) {
GroupIdEnum selectedNormalizeMethod = GroupIdEnum.UNKNOWN;
MultiOptionGroup contrastNormalizeMethodGroup = (MultiOptionGroup) group;
if (contrastEnhancement != null) {
ContrastMethod contrastMethod = contrastEnhancement.getMethod();
if (contrastMethod != null) {
String contrastMethodString = contrastMethod.name();
for (OptionGroup option : contrastNormalizeMethodGroup.getGroupList()) {
if (option.getLabel().compareToIgnoreCase(contrastMethodString) == 0) {
selectedNormalizeMethod = option.getId();
}
}
}
}
contrastNormalizeMethodGroup.setOption(selectedNormalizeMethod);
}
}
Aggregations