com.primix.tapestry.event
Class ObservedChangeEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.primix.tapestry.event.ObservedChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class ObservedChangeEvent
extends java.util.EventObject

Event which describes a change to a particular IComponent.

Version:
$Id: ObservedChangeEvent.java,v 1.4 2001/05/02 14:15:16 hship Exp $
Author:
Howard Ship
See Also:
Serialized Form

Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ObservedChangeEvent(IComponent component)
          Constructor for an unknown change event.
ObservedChangeEvent(IComponent component, java.lang.String propertyName, boolean newValue)
           
ObservedChangeEvent(IComponent component, java.lang.String propertyName, byte newValue)
           
ObservedChangeEvent(IComponent component, java.lang.String propertyName, char newValue)
           
ObservedChangeEvent(IComponent component, java.lang.String propertyName, double newValue)
           
ObservedChangeEvent(IComponent component, java.lang.String propertyName, float newValue)
           
ObservedChangeEvent(IComponent component, java.lang.String propertyName, int newValue)
           
ObservedChangeEvent(IComponent component, java.lang.String propertyName, long newValue)
           
ObservedChangeEvent(IComponent component, java.lang.String propertyName, java.lang.Object newValue)
          Creates the event.
ObservedChangeEvent(IComponent component, java.lang.String propertyName, short newValue)
           
 
Method Summary
 IComponent getComponent()
           
 java.io.Serializable getNewValue()
           
 java.lang.String getPropertyName()
           
 
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

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           char newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           byte newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           short newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           int newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           long newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           double newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           float newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           java.lang.Object newValue)
Creates the event. The new value must be null, or be a serializable object. (It is declared as Object as a concession to the Java 2 collections framework, where the implementations are serializable but the interfaces (Map, List, etc.) don't extend Serializable ... so we wait until runtime to check).
Parameters:
component - The component (not necessarily a page) whose property changed.
propertyName - the name of the property which was changed.
newValue - The new value of the property.
Throws:
java.lang.IllegalArgumentException - if propertyName is null, or if the new value is not serializable

ObservedChangeEvent

public ObservedChangeEvent(IComponent component,
                           java.lang.String propertyName,
                           boolean newValue)

ObservedChangeEvent

public ObservedChangeEvent(IComponent component)
Constructor for an unknown change event. The receiver must acknowledge that the observed object changed. This is used when a property of the component is itself is a data holder (such as a Collection object) and it changes.
Method Detail

getComponent

public IComponent getComponent()

getNewValue

public java.io.Serializable getNewValue()

getPropertyName

public java.lang.String getPropertyName()