Basic HTML version of Foils prepared May 19 99

Foil 25 Bound Properties and Event Design Patterns

From Javabeans Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Geoffrey Fox, Nancy McCracken, Wojtek Furmanski

JellyBean, an example with bound and constrained properties
A property is bound if a change to its value can be reported as an event to other beans.
In general, a bean can create events of type EventNameEvent by implementing methods called public void addEventNameListener(EventNameListener e) public void removeEventNameListener(EventNameListener e) and by making an interface called EventNameListener.
A bean with a bound property creates PropertyChange events. In addition to the above methods, it must have a method called firePropertyChange which is executed for all registered Listeners when the property value is changed, such as in the set method.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999