pointMode.setSelection(false);
polyMode.setSelection(false);
lineMode.setSelection(false);
} else if (mode == Mode.LINE) {
lineMode.setSelection(true);
LineSymbolizer sym = SLDs.lineSymbolizer(fts);
stroke = SLDs.stroke(sym);
placement = SLDs.getPlacement(SLDs.ALIGN_LEFT, SLDs.ALIGN_MIDDLE, 0);
name = sym == null ? null : sym.getGeometryPropertyName();
} else if (mode == Mode.POLYGON) {
polyMode.setSelection(true);
PolygonSymbolizer sym = SLDs.polySymbolizer(fts);
stroke = SLDs.stroke(sym);
fill = SLDs.fill(sym);
placement = SLDs.getPlacement(SLDs.ALIGN_CENTER, SLDs.ALIGN_MIDDLE, 0);
name = sym == null ? null : sym.getGeometryPropertyName();
} else if (mode == Mode.POINT || mode == Mode.ALL) { // default to handling as Point
pointMode.setSelection(true);
PointSymbolizer sym = SLDs.pointSymbolizer(fts);
stroke = SLDs.stroke(sym);
fill = SLDs.fill(sym);
graphic = SLDs.graphic(sym);
placement = SLDs.getPlacement(SLDs.ALIGN_LEFT, SLDs.ALIGN_MIDDLE, 0);
name = sym == null ? null : sym.getGeometryPropertyName();
}
text = SLDs.textSymbolizer(fts);
if (text != null && placement != null) {
text.setLabelPlacement(placement);