net.dpml.component
Class ContextEvent

java.lang.Object
  extended by java.util.EventObject
      extended by net.dpml.component.ContextEvent
All Implemented Interfaces:
Serializable

public class ContextEvent
extends EventObject

Event triggered as a result of change to the value of a context entry.

Version:
1.2.0
Author:
Digital Product Meta Library
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ContextEvent(Provider source, String key, Object from, Object to)
          Construct a new ContextEvent.
 
Method Summary
 String getKey()
          Return the feature name.
 Object getNewValue()
          Return the new value.
 Object getOldValue()
          Return the old value.
 Provider getProvider()
          Return the component model that initiating the event.
 
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
 

Constructor Detail

ContextEvent

public ContextEvent(Provider source,
                    String key,
                    Object from,
                    Object to)
Construct a new ContextEvent.

Parameters:
source - the source provider
key - the context entry key
from - the original value
to - the new value
Method Detail

getKey

public String getKey()
Return the feature name.

Returns:
the name of the modified feature

getOldValue

public Object getOldValue()
Return the old value.

Returns:
the original value

getNewValue

public Object getNewValue()
Return the new value.

Returns:
the new current value

getProvider

public Provider getProvider()
Return the component model that initiating the event.

Returns:
the source model