com.glaivestone.mv
Class ValueChangeEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.glaivestone.mv.ValueChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ValueChangeEvent
extends java.util.EventObject

A ValueChange event is fired when an observed value changes. The old (previous) value and the new (current) value are provided in the event notification.

Origins

Value-change events are similar to property change nofifications in the Java bean component model, but are somewhat simpler in that only the changing value is involved in the event notification, whereas the bean property change notification also identifies the property being changed. Value-change events are used in the model-view with to provide observable value holders, following a pattern used in the Visual Smalltalk ApplicationModel framework.

Author:
Deb Lewis
See Also:
Serialized Form

Constructor Summary
ValueChangeEvent(java.lang.Object source, java.lang.Object oldValue, java.lang.Object newValue)
          Constructs a new ValueChangeEvent.
 
Method Summary
 java.lang.Object getNewValue()
          Returns the new value after the change has been made.
 java.lang.Object getOldValue()
          Returns the old value before the change was made.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueChangeEvent

public ValueChangeEvent(java.lang.Object source,
                        java.lang.Object oldValue,
                        java.lang.Object newValue)
Constructs a new ValueChangeEvent.

Parameters:
source - The owner of the value that fired the event.
oldValue - The old value.
newValue - The new value.
Method Detail

getNewValue

public java.lang.Object getNewValue()
Returns the new value after the change has been made.


getOldValue

public java.lang.Object getOldValue()
Returns the old value before the change was made.


GFL 1.1 API