org.geotools.styling
Class PointSymbolizerImpl

java.lang.Object
  extended byorg.geotools.event.AbstractGTComponent
      extended byorg.geotools.styling.PointSymbolizerImpl
All Implemented Interfaces:
java.lang.Cloneable, org.opengis.util.Cloneable, GTComponent, PointSymbolizer, Symbolizer

public class PointSymbolizerImpl
extends AbstractGTComponent
implements PointSymbolizer, org.opengis.util.Cloneable

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

Version:
$Id: PointSymbolizerImpl.java 17701 2006-01-23 00:00:51Z desruisseaux $
Author:
Ian Turton, CCG

Field Summary
 
Fields inherited from class org.geotools.event.AbstractGTComponent
notification
 
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.
 java.lang.Object clone()
          Creates a deep copy clone.
 boolean equals(java.lang.Object oth)
          Checks this PointSymbolizerImpl with another for equality.
 java.lang.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(java.lang.String name)
          Sets the Geometry Property Name.
 void setGraphic(Graphic graphic)
          Setter for property graphic.
 
Methods inherited from class org.geotools.event.AbstractGTComponent
changed, fireChanged, fireChildChanged, getNote, getParent, removed, setNote
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.event.GTComponent
changed, getNote, getParent, removed, setNote
 

Constructor Detail

PointSymbolizerImpl

protected PointSymbolizerImpl()
Creates a new instance of DefaultPointSymbolizer

Method Detail

getGeometryPropertyName

public java.lang.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(java.lang.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 java.lang.Object clone()
Creates a deep copy clone.

Specified by:
clone in interface org.opengis.util.Cloneable
Overrides:
clone in class AbstractGTComponent
Returns:
The deep copy clone.
Throws:
java.lang.RuntimeException - DOCUMENT ME!

hashCode

public int hashCode()
Generates the hashcode for the PointSymbolizer

Returns:
the hashcode

equals

public boolean equals(java.lang.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

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


Copyright © GeoTools. All Rights Reserved.