Basic HTML version of Foils prepared March 23 98

Foil 22 Constrained Properties

From JavaBeans and Use in ComponentWare Basic Information Track Computational Science Course CPS616 -- March 25 1998. by Nancy McCracken, Geoffrey C. Fox, Wojtek Furmanski


1 A related concept is when another bean wants to have a possible veto over a change to a property.
2 The set method of the property throws an exception called java.beans.PropertyVetoException.
3 The object must also support (by having add and remove methods) a VetoableChangeListener.
4 Then each bean that wants to be able to veto property changes implements VetoableChangeListener by supplying the method vetoableChange(PropertyChangeEvent e).
5 If more than one bean wants to veto property changes, then it may be quite complicated to work out when to keep the old value or move to the new value.

in Table To:


© 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 Sun Nov 29 1998