Basic HTML version of Foils prepared May 19 99

Foil 28 Constrained Properties

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
1 A related concept is when another bean wants to have a possible veto over a change to a property, as in, for example, requiring a number to be in a certain range.
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, i.e. the constrained property is also bound.
4 Then each bean that wants to be able to veto property changes implements VetoableChangeListener by supplying the method vetoableChange(PropertyChangeEvent e) throws PropertyVetoException

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 Mon Jul 5 1999