org.geotools.feature
Class CollectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.geotools.feature.CollectionEvent
All Implemented Interfaces:
java.io.Serializable

public class CollectionEvent
extends java.util.EventObject

A simple event object to represent all events triggered by FeatureCollection instances (typically change events).

See Also:
Serialized Form

Field Summary
static int FEATURES_ADDED
          event type constant denoting the adding of a feature
static int FEATURES_CHANGED
          event type constant denoting that features in the collection has been modified
static int FEATURES_REMOVED
          event type constant denoting the removal of a feature
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CollectionEvent(FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> collection, FeatureEvent event)
           
CollectionEvent(FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> source, org.opengis.feature.simple.SimpleFeature[] involvedFeatures, int type)
          Constructs a new CollectionEvent.
 
Method Summary
 FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> getCollection()
          provides access to the FeatureCollection which fired the event
 int getEventType()
          Provides information on the type of change that has occured.
 org.opengis.feature.simple.SimpleFeature[] getFeatures()
          Getter for property features.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FEATURES_ADDED

public static final int FEATURES_ADDED
event type constant denoting the adding of a feature

See Also:
Constant Field Values

FEATURES_REMOVED

public static final int FEATURES_REMOVED
event type constant denoting the removal of a feature

See Also:
Constant Field Values

FEATURES_CHANGED

public static final int FEATURES_CHANGED
event type constant denoting that features in the collection has been modified

See Also:
Constant Field Values
Constructor Detail

CollectionEvent

public CollectionEvent(FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> collection,
                       FeatureEvent event)

CollectionEvent

public CollectionEvent(FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> source,
                       org.opengis.feature.simple.SimpleFeature[] involvedFeatures,
                       int type)
Constructs a new CollectionEvent.

Parameters:
source - the collection which triggered the event
involvedFeatures - DOCUMENT ME!
type - DOCUMENT ME!
Method Detail

getCollection

public FeatureCollection<? extends org.opengis.feature.type.FeatureType,? extends org.opengis.feature.Feature> getCollection()
provides access to the FeatureCollection which fired the event

Returns:
The FeatureCollection which was the event's source.

getEventType

public int getEventType()
Provides information on the type of change that has occured. Possible types are: add, remove, change

Returns:
an int which must be one of FEATURES_ADDED, FEATURES_REMOVED, FEATURES_CHANGED

getFeatures

public org.opengis.feature.simple.SimpleFeature[] getFeatures()
Getter for property features.

Returns:
Value of property features.


Copyright © 1996-2010 Geotools. All Rights Reserved.