org.geotools.styling
Class PolygonSymbolizerImpl

java.lang.Object
  extended by org.geotools.styling.AbstractSymbolizer
      extended by org.geotools.styling.PolygonSymbolizerImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.style.PolygonSymbolizer, org.opengis.style.Symbolizer

public class PolygonSymbolizerImpl
extends AbstractSymbolizer
implements PolygonSymbolizer, org.opengis.util.Cloneable

Provides a representation of a PolygonSymbolizer in an SLD Document. A PolygonSymbolizer defines how a polygon geometry should be rendered.

Version:
$Id: PolygonSymbolizerImpl.java 34564 2009-11-30 16:08:45Z aaime $
Author:
James Macgill, CCG, Johann Sorel (Geomatys)

Field Summary
 
Fields inherited from class org.geotools.styling.AbstractSymbolizer
description, geometry, name, unitOfMeasure
 
Constructor Summary
protected PolygonSymbolizerImpl()
          Creates a new instance of DefaultPolygonStyler
protected PolygonSymbolizerImpl(Stroke stroke, Fill fill, Displacement disp, org.opengis.filter.expression.Expression offset, javax.measure.unit.Unit<javax.measure.quantity.Length> uom, java.lang.String geom, java.lang.String name, Description desc)
           
 
Method Summary
 void accept(StyleVisitor visitor)
           
 java.lang.Object accept(org.opengis.style.StyleVisitor visitor, java.lang.Object data)
          Accepts a StyleVisitor to perform some operation on this LineSymbolizer.
 java.lang.Object clone()
          Creates a deep copy clone.
 boolean equals(java.lang.Object obj)
           
 Displacement getDisplacement()
          Displacement from the original geometry in pixels.
 Fill getFill()
          Provides the graphical-symbolization parameter to use to fill the area of the geometry.
 org.opengis.filter.expression.Expression getPerpendicularOffset()
           
 StrokeImpl getStroke()
          Provides the graphical-symbolization parameter to use for the outline of the Polygon.
 int hashCode()
           
 void setDisplacement(org.opengis.style.Displacement displacement)
          Provide x / y offset in pixels used to crate shadows.
 void setFill(org.opengis.style.Fill fill)
          Sets the graphical-symbolization parameter to use to fill the area of the geometry.
 void setPerpendicularOffset(org.opengis.filter.expression.Expression offset)
          PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry.
 void setStroke(org.opengis.style.Stroke stroke)
          Sets the graphical-symbolization parameter to use for the outline of the Polygon.
 
Methods inherited from class org.geotools.styling.AbstractSymbolizer
getDescription, getGeometry, getGeometryPropertyName, getName, getUnitOfMeasure, setDescription, setGeometry, setGeometryPropertyName, setName, setUnitOfMeasure
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.styling.Symbolizer
getDescription, getGeometry, getGeometryPropertyName, setDescription, setGeometry, setGeometryPropertyName, setName, setUnitOfMeasure
 
Methods inherited from interface org.opengis.style.Symbolizer
getName, getUnitOfMeasure
 

Constructor Detail

PolygonSymbolizerImpl

protected PolygonSymbolizerImpl()
Creates a new instance of DefaultPolygonStyler


PolygonSymbolizerImpl

protected PolygonSymbolizerImpl(Stroke stroke,
                                Fill fill,
                                Displacement disp,
                                org.opengis.filter.expression.Expression offset,
                                javax.measure.unit.Unit<javax.measure.quantity.Length> uom,
                                java.lang.String geom,
                                java.lang.String name,
                                Description desc)
Method Detail

getPerpendicularOffset

public org.opengis.filter.expression.Expression getPerpendicularOffset()
Specified by:
getPerpendicularOffset in interface org.opengis.style.PolygonSymbolizer

setPerpendicularOffset

public void setPerpendicularOffset(org.opengis.filter.expression.Expression offset)
Description copied from interface: PolygonSymbolizer
PerpendicularOffset works as defined for LineSymbolizer, allowing to draw polygons smaller or larger than their actual geometry.

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: PolygonSymbolizer
Displacement from the original geometry in pixels.

Specified by:
getDisplacement in interface org.opengis.style.PolygonSymbolizer
Returns:
Displacement above and to the right of the indicated point; default x=0, y=0

setDisplacement

public void setDisplacement(org.opengis.style.Displacement displacement)
Description copied from interface: PolygonSymbolizer
Provide x / y offset in pixels used to crate shadows.


getFill

public Fill getFill()
Provides the graphical-symbolization parameter to use to fill the area of the geometry.

Specified by:
getFill in interface org.opengis.style.PolygonSymbolizer
Returns:
The Fill style to use when rendering the area.

setFill

public void setFill(org.opengis.style.Fill fill)
Sets the graphical-symbolization parameter to use to fill the area of the geometry.

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:
getStroke in interface org.opengis.style.PolygonSymbolizer
Returns:
The Stroke style to use when rendering lines.

setStroke

public void setStroke(org.opengis.style.Stroke stroke)
Sets the graphical-symbolization parameter to use for the outline of the Polygon.

Parameters:
stroke - The Stroke style to use when rendering lines.

accept

public java.lang.Object accept(org.opengis.style.StyleVisitor visitor,
                               java.lang.Object data)
Accepts a StyleVisitor to perform some operation on this LineSymbolizer.

Specified by:
accept in interface org.opengis.style.PolygonSymbolizer
Specified by:
accept in interface org.opengis.style.Symbolizer
Parameters:
visitor - The visitor to accept.

accept

public void accept(StyleVisitor visitor)

clone

public java.lang.Object clone()
Creates a deep copy clone. TODO: Need to complete the deep copy, currently only shallow copy.

Overrides:
clone in class java.lang.Object
Returns:
The deep copy clone.
Throws:
java.lang.RuntimeException - DOCUMENT ME!

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractSymbolizer

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class AbstractSymbolizer


Copyright © 1996-2010 Geotools. All Rights Reserved.