CategorizedPoint extends AbstractCategorizedLegend<PointParameters> implements SymbolUom, EnablesStroke, OnVertexOnInterior { @Override public PointParameters put(Double d, PointParameters pp) { forceMapping(d); PointParameters ret = null; if(containsKey(d)){ ret = get(d); } if(strokeEnabled){ colorStroke.put(d, pp.getLineColor()); opacityStroke.put(d, pp.getLineOpacity()); widthStroke.put(d,pp.getLineWidth()); dashStroke.put(d, pp.getLineDash()); } colorFill.put(d, pp.getFillColor()); opacityFill.put(d, pp.getFillOpacity()); widthSymbol.put(d,pp.getWidth()); heightSymbol.put(d,pp.getHeight()); wkn.put(d,pp.getWkn()); return ret; } CategorizedPoint();  CategorizedPoint(PointSymbolizer sym); @Override List<CategorizedLegend> getCategorizedLegend(); @Override Symbolizer getSymbolizer(); @Override String getLegendTypeName(); @Override PointParameters get(Object o); @Override PointParameters put(Double d, PointParameters pp); @Override PointParameters remove(Object o); @Override boolean isStrokeEnabled(); @Override void setStrokeEnabled(boolean enable); @Override void setFallbackParameters(PointParameters fallback); @Override PointParameters getFallbackParameters(); @Override void setOnVertex(); @Override void setOnInterior(); @Override boolean isOnVertex(); @Override Uom getStrokeUom(); @Override void setStrokeUom(Uom u); @Override Uom getSymbolUom(); @Override void setSymbolUom(Uom u); @Override String getLegendTypeId(); static final String NAME; }
@Test public void testParamsToCat() throws Exception { PointSymbolizer ps = new PointSymbolizer(); CategorizedPoint cp = new CategorizedPoint(ps); cp.put(25.0, new PointParameters(Color.decode("#223344"), .2, 22.0, "1 1", Color.decode("#113355"), .5, 5.0, 5.0, "SQUARE")); MarkGraphic mg = (MarkGraphic) ps.getGraphicCollection().getGraphic(0); PenStroke str = (PenStroke) mg.getStroke(); assertTrue(str.getWidth() instanceof Categorize); assertTrue(str.getDashArray() instanceof Categorize); assertTrue(((SolidFill)str.getFill()).getColor() instanceof Categorize); assertTrue(((SolidFill)str.getFill()).getOpacity() instanceof Categorize); assertTrue(((SolidFill)mg.getFill()).getColor() instanceof Categorize); assertTrue(((SolidFill)mg.getFill()).getOpacity() instanceof Categorize); assertTrue(mg.getViewBox().getWidth() instanceof Categorize); assertTrue(mg.getViewBox().getHeight() instanceof Categorize); assertTrue(mg.getWkn() instanceof Categorize); }