public TextSymbolizerBuilder reset() { fill.reset(); // TODO: default fill for text? halo.unset(); // no default halo label = null; geometry = null; placement.reset(); options.clear(); uom = null; unset = false; return this; }
public TextSymbolizer build() { if (unset) { return null; } Font[] array = new Font[fonts.size()]; for (int i = 0; i < array.length; i++) { array[i] = fonts.get(i).build(); } TextSymbolizer ts = sf.createTextSymbolizer( fill.build(), array, halo.build(), label, placement.build(), geometry); if (uom != null) { ts.setUnitOfMeasure(uom); } if (ts instanceof TextSymbolizer2 && options != null) { TextSymbolizer2 ts2 = (TextSymbolizer2) ts; ts2.getOptions().putAll(options); } reset(); return ts; }