org.geotools.event
Class GTEventImpl

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.geotools.event.GTEventImpl
All Implemented Interfaces:
GTEvent, java.io.Serializable

public class GTEventImpl
extends java.util.EventObject
implements GTEvent

Captures changes to Style.

The "delta" acts as a series of bread crumbs allowing you the listener to figure out what changed where. The Type answers that other peskey question: when.

You should be warned that deltas may also be "saved up" for a rainy day, this keeps user interfaces from being flooded with a cascade of events. The best example is a "macro" that makes a series of changes and only reports back a compound change resulting from the batch opperation.

Since:
2.2.M3
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.geotools.event.GTEvent
GTEvent.Type
 
Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GTEventImpl(GTRoot source)
           
GTEventImpl(GTRoot source, GTDelta delta)
           
GTEventImpl(GTRoot source, GTEvent.Type type, GTDelta delta)
           
 
Method Summary
 GTDelta getDelta()
          Returns a delta, rooted at style, describing the set of changes that happened.
 GTEvent.Type getType()
          Returns the type of event being reported.
 void setDelta(GTDelta delta)
           
 void setType(GTEvent.Type type)
           
 
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
 
Methods inherited from interface org.geotools.event.GTEvent
getSource
 

Constructor Detail

GTEventImpl

public GTEventImpl(GTRoot source)

GTEventImpl

public GTEventImpl(GTRoot source,
                   GTDelta delta)

GTEventImpl

public GTEventImpl(GTRoot source,
                   GTEvent.Type type,
                   GTDelta delta)
Method Detail

getDelta

public GTDelta getDelta()
Returns a delta, rooted at style, describing the set of changes that happened. Returns null if not applicable to this type of event.

Specified by:
getDelta in interface GTEvent
Returns:
the style delta, or null if not applicable

getType

public GTEvent.Type getType()
Returns the type of event being reported.

Specified by:
getType in interface GTEvent
Returns:
one of the event type constants
See Also:
#POST_CHANGE, #PRE_DELETE

setDelta

public void setDelta(GTDelta delta)

setType

public void setType(GTEvent.Type type)


Copyright © GeoTools. All Rights Reserved.