org.geotools.styling
Interface StyleEvent


public interface StyleEvent

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.M2
Author:
Jody Garnett, Refractions Research

Nested Class Summary
static class StyleEvent.Type
          Constants used to indicate the type of StyleChangedEvent
 
Method Summary
 StyleDelta getDelta()
          Returns a delta, rooted at style, describing the set of changes that happened.
 java.lang.Object getSource()
          Returns an object identifying the source of this event.
 Style getStyle()
          Style being changed, handy if you are listening to several styles at once.
 StyleEvent.Type getType()
          Returns the type of event being reported.
 java.lang.Object getVictim()
          If this change is limited to a single strand, Style being changed, handy if you are listening to several styles at once.
 

Method Detail

getDelta

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

Returns:
the style delta, or null if not applicable

getStyle

public Style getStyle()
Style being changed, handy if you are listening to several styles at once.

Returns:
Style being changed

getVictim

public java.lang.Object getVictim()
If this change is limited to a single strand, Style being changed, handy if you are listening to several styles at once.

Returns:
Style being changed

getSource

public java.lang.Object getSource()
Returns an object identifying the source of this event.

This is used by user interfaces, so they can ignore events generated by their own actions (but I don't have to tell you this).

Returns:
an object identifying the source of this event
See Also:
EventObject

getType

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

Returns:
one of the event type constants
See Also:
#POST_CHANGE, #PRE_DELETE


Copyright © GeoTools. All Rights Reserved.