use of org.geotools.styling.StrokeImpl in project sldeditor by robward-scisys.
the class FieldConfigWKT method setValue.
/**
* Sets the value.
*
* @param symbolizerType the symbolizer type
* @param fieldConfigManager the field config manager
* @param multiOptionPanel the multi option panel
* @param graphic the graphic
* @param symbol the symbol
*/
@Override
public void setValue(Class<?> symbolizerType, GraphicPanelFieldManager fieldConfigManager, FieldConfigSymbolType multiOptionPanel, Graphic graphic, GraphicalSymbol symbol) {
if ((symbol != null) && (fieldConfigManager != null)) {
if (symbol instanceof Mark) {
MarkImpl markerSymbol = (MarkImpl) symbol;
// Fill
FillImpl fill = markerSymbol.getFill();
if (fill != null) {
populateColour(fieldConfigManager, fillFieldConfig, fill.getColor(), fill.getOpacity());
}
GroupConfigInterface fillGroup = fieldConfigManager.getGroup(fieldConfigManager.getComponentId(), fillFieldConfig.getGroup());
if (fillGroup != null) {
fillGroup.enable(fill != null);
}
// Stroke
StrokeImpl stroke = markerSymbol.getStroke();
if (stroke != null) {
populateColour(fieldConfigManager, strokeFieldConfig, stroke.getColor(), stroke.getOpacity());
}
GroupConfigInterface strokeGroup = fieldConfigManager.getGroup(fieldConfigManager.getComponentId(), strokeFieldConfig.getGroup());
if (strokeGroup != null) {
strokeGroup.enable(stroke != null);
}
if (wktPanel != null) {
wktPanel.populateExpression(markerSymbol.getWellKnownName().toString());
}
if (multiOptionPanel != null) {
multiOptionPanel.setSelectedItem(WKT_SYMBOL_KEY);
}
}
}
}
Aggregations