use of org.geotools.styling.TextSymbolizer.PolygonAlignOptions in project sldeditor by robward-scisys.
the class VOGeoServerLabelling method internal_updateSymbolEnumField.
/**
* Internal_update symbol enum field.
*
* @param options the options
* @param field the field
* @param key the key
*/
private void internal_updateSymbolEnumField(Map<String, String> options, FieldIdEnum field, String key) {
ValueComboBoxData value = fieldConfigVisitor.getComboBox(field);
Object object = getDefaultFieldValue(field);
String defaultValue = null;
if (object instanceof TextSymbolizer.PolygonAlignOptions) {
TextSymbolizer.PolygonAlignOptions option = (PolygonAlignOptions) object;
defaultValue = option.toString();
} else {
defaultValue = (String) object;
}
if (defaultValue == null) {
ConsoleManager.getInstance().error(this, "Failed to find default for field : " + field);
} else if ((value.getKey().compareToIgnoreCase(defaultValue) != 0) || includeValue(field)) {
options.put(key, value.getKey());
}
}
use of org.geotools.styling.TextSymbolizer.PolygonAlignOptions in project sldeditor by robward-scisys.
the class VOGeoServerLabellingUnderline method internal_updateSymbolEnumField.
/**
* Internal_update symbol enum field.
*
* @param options the options
* @param field the field
* @param key the key
*/
private void internal_updateSymbolEnumField(Map<String, String> options, FieldIdEnum field, String key) {
ValueComboBoxData value = fieldConfigVisitor.getComboBox(field);
Object object = getDefaultFieldValue(field);
String defaultValue = null;
if (object instanceof TextSymbolizer.PolygonAlignOptions) {
TextSymbolizer.PolygonAlignOptions option = (PolygonAlignOptions) object;
defaultValue = option.toString();
} else {
defaultValue = (String) object;
}
if (defaultValue == null) {
ConsoleManager.getInstance().error(this, "Failed to find default for field : " + field);
} else if (value.getKey().compareToIgnoreCase(defaultValue) != 0) {
options.put(key, value.getKey());
}
}
use of org.geotools.styling.TextSymbolizer.PolygonAlignOptions in project sldeditor by robward-scisys.
the class VOGeoServerRandomFill method internal_updateSymbolEnumField.
/**
* Internal_update symbol enum field.
*
* @param options the options
* @param field the field
* @param key the key
*/
private void internal_updateSymbolEnumField(Map<String, String> options, FieldIdEnum field, String key) {
ValueComboBoxData value = fieldConfigVisitor.getComboBox(field);
Object object = getDefaultFieldValue(field);
String defaultValue = null;
if (object instanceof TextSymbolizer.PolygonAlignOptions) {
TextSymbolizer.PolygonAlignOptions option = (PolygonAlignOptions) object;
defaultValue = option.toString();
} else {
defaultValue = (String) object;
}
if (defaultValue == null) {
ConsoleManager.getInstance().error(this, "Failed to find default for field : " + field);
} else if (value.getKey().compareToIgnoreCase(defaultValue) != 0) {
options.put(key, value.getKey());
}
}
Aggregations