Package org.geotools.styling
Class PolygonSymbolizerImpl
- Object
-
- AbstractSymbolizer
-
- PolygonSymbolizerImpl
-
- All Implemented Interfaces:
Cloneable,PolygonSymbolizer,Symbolizer,Cloneable
public class PolygonSymbolizerImpl extends AbstractSymbolizer implements PolygonSymbolizer, Cloneable
Provides a representation of a PolygonSymbolizer in an SLD Document. A PolygonSymbolizer defines how a polygon geometry should be rendered.- Author:
- James Macgill, CCG, Johann Sorel (Geomatys)
-
-
Field Summary
-
Fields inherited from class AbstractSymbolizer
description, geometry, name, options, unitOfMeasure
-
Fields inherited from interface PolygonSymbolizer
GRAPHIC_MARGIN_KEY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPolygonSymbolizerImpl()Creates a new instance of DefaultPolygonStylerprotectedPolygonSymbolizerImpl(Stroke stroke, Fill fill, Displacement disp, Expression offset, Unit<Length> uom, String geom, String name, Description desc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(StyleVisitor visitor)Objectaccept(TraversingStyleVisitor visitor, Object data)Accepts a StyleVisitor to perform some operation on this LineSymbolizer.Objectclone()Creates a deep copy clone.booleanequals(Object obj)DisplacementgetDisplacement()The Displacement gives the X and Y displacements from the original geometry.FillgetFill()Provides the graphical-symbolization parameter to use to fill the area of the geometry.ExpressiongetPerpendicularOffset()PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry.StrokeImplgetStroke()Provides the graphical-symbolization parameter to use for the outline of the Polygon.inthashCode()voidsetDisplacement(Displacement displacement)Provide x / y offset in pixels used to crate shadows.voidsetFill(Fill fill)Sets the graphical-symbolization parameter to use to fill the area of the geometry.voidsetPerpendicularOffset(Expression offset)PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry.voidsetStroke(Stroke stroke)Sets the graphical-symbolization parameter to use for the outline of the Polygon.-
Methods inherited from class AbstractSymbolizer
getDescription, getGeometry, getGeometryPropertyName, getName, getOptions, getUnitOfMeasure, hasOption, setDescription, setGeometry, setGeometryPropertyName, setName, setUnitOfMeasure
-
Methods inherited from class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface Symbolizer
getDescription, getGeometry, getGeometryPropertyName, getName, getOptions, getUnitOfMeasure, hasOption, setDescription, setGeometry, setGeometryPropertyName, setName, setUnitOfMeasure
-
-
-
-
Constructor Detail
-
PolygonSymbolizerImpl
protected PolygonSymbolizerImpl()
Creates a new instance of DefaultPolygonStyler
-
PolygonSymbolizerImpl
protected PolygonSymbolizerImpl(Stroke stroke, Fill fill, Displacement disp, Expression offset, Unit<Length> uom, String geom, String name, Description desc)
-
-
Method Detail
-
getPerpendicularOffset
public Expression getPerpendicularOffset()
Description copied from interface:PolygonSymbolizerPerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry. The distance is in uoms and is positive to the outside of the polygon. Negative numbers mean drawing the polygon smaller. The default offset is 0.- Specified by:
getPerpendicularOffsetin interfacePolygonSymbolizer- Returns:
- Expression
-
setPerpendicularOffset
public void setPerpendicularOffset(Expression offset)
Description copied from interface:PolygonSymbolizerPerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry.- Specified by:
setPerpendicularOffsetin interfacePolygonSymbolizer- Parameters:
offset- Offset from the edge polygon positive outside; negative to the inside with a default of 0.
-
getDisplacement
public Displacement getDisplacement()
Description copied from interface:PolygonSymbolizerThe Displacement gives the X and Y displacements from the original geometry. This element may be used to avoid over-plotting of multiple PolygonSymbolizers for one geometry or supplying "shadows" of polygon gemeotries. The displacements are in units of pixels above and to the right of the point. The default displacement is X=0, Y=0.- Specified by:
getDisplacementin interfacePolygonSymbolizer- Returns:
- Displacement
-
setDisplacement
public void setDisplacement(Displacement displacement)
Description copied from interface:PolygonSymbolizerProvide x / y offset in pixels used to crate shadows.- Specified by:
setDisplacementin interfacePolygonSymbolizer
-
getFill
public Fill getFill()
Provides the graphical-symbolization parameter to use to fill the area of the geometry.- Specified by:
getFillin interfacePolygonSymbolizer- Returns:
- The Fill style to use when rendering the area.
-
setFill
public void setFill(Fill fill)
Sets the graphical-symbolization parameter to use to fill the area of the geometry.- Specified by:
setFillin interfacePolygonSymbolizer- Parameters:
fill- The Fill style to use when rendering the area.
-
getStroke
public StrokeImpl getStroke()
Provides the graphical-symbolization parameter to use for the outline of the Polygon.- Specified by:
getStrokein interfacePolygonSymbolizer- Returns:
- The Stroke style to use when rendering lines.
-
setStroke
public void setStroke(Stroke stroke)
Sets the graphical-symbolization parameter to use for the outline of the Polygon.- Specified by:
setStrokein interfacePolygonSymbolizer- Parameters:
stroke- The Stroke style to use when rendering lines.
-
accept
public Object accept(TraversingStyleVisitor visitor, Object data)
Accepts a StyleVisitor to perform some operation on this LineSymbolizer.- Specified by:
acceptin interfacePolygonSymbolizer- Specified by:
acceptin interfaceSymbolizer- Parameters:
visitor- The visitor to accept.- Returns:
- value produced
-
accept
public void accept(StyleVisitor visitor)
- Specified by:
acceptin interfaceSymbolizer
-
clone
public Object clone()
Creates a deep copy clone. TODO: Need to complete the deep copy, currently only shallow copy.- Specified by:
clonein interfaceCloneable- Overrides:
clonein classObject- Returns:
- The deep copy clone.
- See Also:
Object.clone()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractSymbolizer
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractSymbolizer
-
-