PenStroke extends Stroke implements FillNode { @Override public void setFill(Fill fill) { this.fill = fill == null ? getDefaultFill() : fill; this.fill.setParent(this); } PenStroke();  PenStroke(PenStrokeType t);  PenStroke(JAXBElement<PenStrokeType> s); @Override Double getNaturalLength(Map<String,Object> map, Shape shp, MapTransform mt); @Override Double getNaturalLengthForCompound(Map<String,Object> map,
            Shape shp, MapTransform mt); @Override List<SymbolizerNode> getChildren(); @Override Fill getFill(); @Override void setFill(Fill fill); void setLineCap(LineCap cap); LineCap getLineCap(); void setLineJoin(LineJoin join); LineJoin getLineJoin(); void setWidth(RealParameter width); RealParameter getWidth(); RealParameter getDashOffset(); void setDashOffset(RealParameter dashOffset); StringParameter getDashArray(); void setDashArray(StringParameter dashArray); BasicStroke getBasicStroke(Map<String,Object> map, MapTransform mt, Double v100p); @Override void draw(Graphics2D g2, Map<String,Object> map, Shape shape,
            boolean selected, MapTransform mt, double offset); double getWidthInPixel(Map<String,Object> map, MapTransform mt); double getMinLength(Map<String,Object> map, MapTransform mt); @Override JAXBElement<PenStrokeType> getJAXBElement(); PenStrokeType getJAXBType(); static final double DEFAULT_WIDTH; static final LineCap DEFAULT_CAP; static final LineJoin DEFAULT_JOIN; }
@Test public void testSetFill() throws Exception { PenStroke ps = new PenStroke(); assertTrue(ps.getFill() instanceof SolidFill); SolidFill sf = (SolidFill) ps.getFill(); assertEquals(sf.getColor().getColor(null),Color.BLACK); assertEquals(sf.getOpacity().getValue(null), (Double)1.0); ps.setFill(null); assertTrue(ps.getFill() instanceof SolidFill); sf = (SolidFill) ps.getFill(); assertEquals(sf.getColor().getColor(null),Color.BLACK); assertEquals(sf.getOpacity().getValue(null), (Double)1.0); ps.setFill(new GraphicFill()); assertFalse(ps.getFill() instanceof SolidFill); }