anl.aida.gis
Class FeaturePropertyFinder

java.lang.Object
  extended by anl.aida.gis.FeaturePropertyFinder
All Implemented Interfaces:
LocationChangedListener

public class FeaturePropertyFinder
extends java.lang.Object
implements LocationChangedListener

Finds a attribute of a feature given a location.


Field Summary
private  FeatureSpatialMap map
           
private  java.lang.String name
           
private  java.lang.String value
           
 
Constructor Summary
FeaturePropertyFinder(java.lang.String attributeName, org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features)
           
FeaturePropertyFinder(java.lang.String attributeName, java.io.File shapeFile)
           
 
Method Summary
 java.lang.String getAttributeName()
          Gets the name of the attribute this finder finds.
 java.lang.String getValue()
          Gets the value of the current feature's attribute or null if no feature is found.
 void locationChanged(com.vividsolutions.jts.geom.Point pt)
          Called when the location changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

private FeatureSpatialMap map

value

private java.lang.String value

name

private java.lang.String name
Constructor Detail

FeaturePropertyFinder

public FeaturePropertyFinder(java.lang.String attributeName,
                             java.io.File shapeFile)

FeaturePropertyFinder

public FeaturePropertyFinder(java.lang.String attributeName,
                             org.geotools.feature.FeatureCollection<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> features)
Method Detail

getAttributeName

public java.lang.String getAttributeName()
Gets the name of the attribute this finder finds.

Returns:
the name of the attribute this finder finds.

getValue

public java.lang.String getValue()
Gets the value of the current feature's attribute or null if no feature is found.

Returns:

locationChanged

public void locationChanged(com.vividsolutions.jts.geom.Point pt)
Description copied from interface: LocationChangedListener
Called when the location changed. If pt is null, then location is in someway incoherent. For example, if the mouse moved off of the map entirely.

Specified by:
locationChanged in interface LocationChangedListener
Parameters:
pt - the new location