Beans specification question regarding Customizers

In the beans 1.0.1 specification, it says that a Customizer must extend from java.awt.Component, and furthermore that it must implement the addPropertyChangeListener() method. All fine and good; note that by extending from Component you get this implementation for free.

But there's the problem. The specification also says that as far as acustomizer is concerned, any property change listeners that are added should be notified when thetarget bean has a property changed. But java.awt.Component's addPropertyChangeListener() method, not surprisingly, is used to notify property change listeners whena property of the Component has changed. That is, the source of the PropertyChangeEvent that is fired is the Component itself, and the property name may be something like "font", "color", etc. etc.

The specification does not tell you how to differentiate between the two cases--only that when a property change is fired from the customizer, any GUI that might be showing the bean needs to update itself.

Eclipse's visual editor says that it solves this problem by taking what is essentially the PropertyEditor approach--it copies all the properties of the bean before it "goes into" the Customizer, and then on every single property change reported by the Customizer (most of which will be of course for Component properties like font and color) it quickly checks to see if any property has changed. If so, the bean is updated.

That seems hideous to me, but I have to grant that the specification is just a silent gaping void on this issue. In case anyone from the Java beans team is reading this (since the feedback email address on the specification no longer works), can you shed any light on the spec in this regard?

Thanks,

Laird

[1804 byte] By [ljnelsona] at [2007-11-27 4:42:31]
# 1
Looks like people have been having this problem for a long time: http://groups.google.com/group/comp.lang.java.beans/browse_thread/thread/681019e7055c7b18/586b227cb9c43b1d?lnk=gst&q=customizer&rnum=1#586b227cb9c43b1dLaird
ljnelsona at 2007-7-12 9:54:05 > top of Java-index,Desktop,Developing for the Desktop...