net.dpml.component
Class ModelEvent

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

public class ModelEvent
extends EventObject

Event triggered as a result of a model change.

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

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ModelEvent(Model source, String feature, Object from, Object to)
          Construct a new ModelEvent.
 
Method Summary
 String getFeature()
          Return the feature name.
 Object getNewValue()
          Return the new value.
 Object getOldValue()
          Return the old value.
 Model getSourceModel()
          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

ModelEvent

public ModelEvent(Model source,
                  String feature,
                  Object from,
                  Object to)
Construct a new ModelEvent.

Parameters:
source - the source component model
feature - the name of the model feature
from - the original value
to - the new value
Method Detail

getFeature

public String getFeature()
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

getSourceModel

public Model getSourceModel()
Return the component model that initiating the event.

Returns:
the source model