org.geotools.styling
Class PointSymbolizerImpl

Object
  extended by PointSymbolizerImpl
All Implemented Interfaces:
Cloneable, PointSymbolizer, Symbolizer

public class PointSymbolizerImpl
extends Object
implements PointSymbolizer, Cloneable

Provides a Java representation of the PointSymbolizer. This defines how points are to be rendered.

Author:
Ian Turton, CCG
Module:

Constructor Summary
protected PointSymbolizerImpl()
          Creates a new instance of DefaultPointSymbolizer
 
Method Summary
 void accept(StyleVisitor visitor)
          Accept a StyleVisitor to perform an operation on this symbolizer.
 Object clone()
          Creates a deep copy clone.
 boolean equals(Object oth)
          Checks this PointSymbolizerImpl with another for equality.
 String getGeometryPropertyName()
          This property defines the geometry to be used for styling.
 Graphic getGraphic()
          Provides the graphical-symbolization parameter to use for the point geometry.
 int hashCode()
          Generates the hashcode for the PointSymbolizer
 void setGeometryPropertyName(String name)
          Sets the Geometry Property Name.
 void setGraphic(Graphic graphic)
          Setter for property graphic.
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointSymbolizerImpl

protected PointSymbolizerImpl()
Creates a new instance of DefaultPointSymbolizer

Method Detail

getGeometryPropertyName

public String getGeometryPropertyName()
Description copied from interface: PointSymbolizer
This property defines the geometry to be used for styling.
The property is optional and if it is absent (null) then the "default" geometry property of the feature should be used. Geometry types other than inherently point types can be used. The geometryPropertyName is the name of a geometry property in the Feature being styled. Typically, features only have one geometry so, in general, the need to select one is not required. Note: this moves a little away from the SLD spec which provides an XPath reference to a Geometry object, but does follow it in spirit.

Specified by:
getGeometryPropertyName in interface PointSymbolizer
Returns:
String The name of the attribute in the feature being styled that should be used. If null then the default geometry should be used.

setGeometryPropertyName

public void setGeometryPropertyName(String name)
Sets the Geometry Property Name.

Specified by:
setGeometryPropertyName in interface PointSymbolizer
Parameters:
name - The Geometry Property Name.

getGraphic

public Graphic getGraphic()
Provides the graphical-symbolization parameter to use for the point geometry.

Specified by:
getGraphic in interface PointSymbolizer
Returns:
The Graphic to be used when drawing a point

setGraphic

public void setGraphic(Graphic graphic)
Setter for property graphic.

Specified by:
setGraphic in interface PointSymbolizer
Parameters:
graphic - New value of property graphic.

accept

public void accept(StyleVisitor visitor)
Accept a StyleVisitor to perform an operation on this symbolizer.

Specified by:
accept in interface Symbolizer
Parameters:
visitor - The StyleVisitor to accept.

clone

public Object clone()
Creates a deep copy clone.

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

hashCode

public int hashCode()
Generates the hashcode for the PointSymbolizer

Overrides:
hashCode in class Object
Returns:
the hashcode

equals

public boolean equals(Object oth)
Checks this PointSymbolizerImpl with another for equality.

Two PointSymbolizers are equal if the have the same geometry property name and their graphic object is equal.

Note: this method only works for other instances of PointSymbolizerImpl, not other implementors of PointSymbolizer

Overrides:
equals in class Object
Parameters:
oth - The object to compare with this PointSymbolizerImpl for equality.
Returns:
True of oth is a PointSymbolizerImpl that is equal.


Copyright © 1996-2009 Geotools. All Rights Reserved.