use of com.sldeditor.common.xml.ui.FieldIdEnum in project sldeditor by robward-scisys.
the class VOGeoServerTextSpacing method getMinimumVersion.
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.iface.PopulateDetailsInterface#getMinimumVersion(java.lang.Object, java.util.List)
*/
@Override
public void getMinimumVersion(Object parentObj, Object sldObj, List<VendorOptionPresent> vendorOptionsPresentList) {
if (sldObj instanceof TextSymbolizer) {
TextSymbolizer textSymbolizer = (TextSymbolizer) sldObj;
Map<String, String> options = textSymbolizer.getOptions();
for (FieldIdEnum key : fieldMap.keySet()) {
String vendorOptionAttributeKey = fieldMap.get(key);
if (options.containsKey(vendorOptionAttributeKey)) {
VendorOptionPresent voPresent = new VendorOptionPresent(sldObj, getVendorOptionInfo());
vendorOptionsPresentList.add(voPresent);
}
}
}
}
use of com.sldeditor.common.xml.ui.FieldIdEnum in project sldeditor by robward-scisys.
the class VOGeoServerRandomFill method populate.
/**
* Populate.
*
* @param polygonSymbolizer the polygon symbolizer
*/
@Override
public void populate(PolygonSymbolizer polygonSymbolizer) {
Map<String, String> options = null;
if (polygonSymbolizer != null) {
options = polygonSymbolizer.getOptions();
}
for (FieldIdEnum key : fieldMap.keySet()) {
internalPopulate(options, key, fieldMap.get(key));
}
handleFieldState();
}
use of com.sldeditor.common.xml.ui.FieldIdEnum in project sldeditor by robward-scisys.
the class VOGeoServerRandomFill method getMinimumVersion.
/*
* (non-Javadoc)
*
* @see com.sldeditor.ui.iface.PopulateDetailsInterface#getMinimumVersion(java.lang.Object,
* java.util.List)
*/
@Override
public void getMinimumVersion(Object parentObj, Object sldObj, List<VendorOptionPresent> vendorOptionsPresentList) {
if (parentObj instanceof PolygonSymbolizer) {
PolygonSymbolizer polygon = (PolygonSymbolizer) parentObj;
Map<String, String> options = polygon.getOptions();
for (FieldIdEnum key : fieldMap.keySet()) {
String vendorOptionAttributeKey = fieldMap.get(key);
if (options.containsKey(vendorOptionAttributeKey)) {
VendorOptionPresent voPresent = new VendorOptionPresent(sldObj, getVendorOptionInfo());
vendorOptionsPresentList.add(voPresent);
}
}
}
}
use of com.sldeditor.common.xml.ui.FieldIdEnum in project sldeditor by robward-scisys.
the class LiteralPanel method displayLiteral.
/**
* Display literal value.
*
* @param node the node
*/
private void displayLiteral(ExpressionNode node) {
if (node == null) {
return;
}
if (fieldConfig != null) {
remove(fieldConfig.getPanel());
}
fieldConfig = PanelField.getField(ExpressionPanelv2.class, "LiteralPanel.value", node.getType());
if (fieldConfig != null) {
fieldConfig.createUI();
fieldConfig.addDataChangedListener(new UpdateSymbolInterface() {
@Override
public void dataChanged(FieldIdEnum changedField) {
updateButtonState(true);
}
});
add(fieldConfig.getPanel(), BorderLayout.NORTH);
fieldConfig.populate(node.getExpression());
}
revalidate();
}
use of com.sldeditor.common.xml.ui.FieldIdEnum in project sldeditor by robward-scisys.
the class PanelField method getField.
/**
* Gets the field.
*
* @param classType the class type
* @param valueTextLocalisation the value text localisation
* @param nodeType the node type
* @return the field
*/
public static FieldConfigBase getField(Class<?> classType, String valueTextLocalisation, Class<?> nodeType) {
FieldConfigBase fieldConfig = null;
RenderTransformValueInterface value = RenderTransformValueFactory.getInstance().getValue(nodeType);
if (value != null) {
String valueText = Localisation.getString(classType, valueTextLocalisation);
FieldIdEnum fieldId = FieldIdEnum.FUNCTION;
FieldConfigCommonData commonData = new FieldConfigCommonData(null, fieldId, valueText, true);
fieldConfig = value.getField(commonData);
} else {
System.err.println("Unknown field type : " + nodeType);
}
return fieldConfig;
}
Aggregations