CategorizedArea extends AbstractCategorizedLegend<AreaParameters> implements EnablesStroke { @Override public AreaParameters put(Double d, AreaParameters ap) { forceMapping(d); AreaParameters ret = null; if(containsKey(d)){ ret = get(d); } if(strokeEnabled){ colorStroke.put(d, ap.getLineColor()); opacityStroke.put(d, ap.getLineOpacity()); widthStroke.put(d,ap.getLineWidth()); dashStroke.put(d, ap.getLineDash()); } colorFill.put(d, ap.getFillColor()); opacityFill.put(d, ap.getFillOpacity()); return ret; } CategorizedArea();  CategorizedArea(AreaSymbolizer as); @Override List<CategorizedLegend> getCategorizedLegend(); @Override Symbolizer getSymbolizer(); @Override String getLegendTypeName(); @Override AreaParameters get(Object o); @Override AreaParameters put(Double d, AreaParameters ap); @Override AreaParameters remove(Object o); @Override void setFallbackParameters(AreaParameters fallback); @Override AreaParameters getFallbackParameters(); @Override boolean isStrokeEnabled(); @Override void setStrokeEnabled(boolean enable); @Override Uom getStrokeUom(); @Override void setStrokeUom(Uom u); @Override String getLegendTypeId(); static final String NAME; }
@Test public void testTransformToCategorize() throws Exception { AreaSymbolizer as = new AreaSymbolizer(); CategorizedArea ca = new CategorizedArea(as); ca.put(76000.0, new AreaParameters(Color.decode("#ababab"),1.2,12.0,"11 2 1",Color.decode("#bcbcbc"),1.5)); SolidFill sfi = (SolidFill) as.getFill(); PenStroke ps = (PenStroke) as.getStroke(); SolidFill sfp = (SolidFill) ps.getFill(); assertTrue(sfi.getColor() instanceof Categorize); assertTrue(sfi.getOpacity() instanceof Categorize); assertTrue(sfp.getColor() instanceof Categorize); assertTrue(sfp.getOpacity() instanceof Categorize); assertTrue(ps.getDashArray() instanceof Categorize); assertTrue(ps.getWidth() instanceof Categorize); }