hey to all gui-experts,
I have a question concerning the PropertyChangeListener. Is it possible
to set an order in which all PropertyChangeListener will be notified?
Greetings Chris
Steve W. Jackson - 05 Sep 2003 20:34 GMT
>:hey to all gui-experts,
>:
>:I have a question concerning the PropertyChangeListener. Is it possible
>:to set an order in which all PropertyChangeListener will be notified?
>:
>:Greetings Chris
I don't think you can guarantee it, but it's likely to be the order in
which they're added to the list via the addPropertyChangeListener() call.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama
Karsten Lentzsch - 06 Sep 2003 10:19 GMT
> [...] Is it possible to set an order in which all
> PropertyChangeListener will be notified?
Although it is possible, I'd recommend to not do so.
Typically an observable hides the implementation
of the update notification. However, you can write
your own update mechanism that guarantees the order.
You decouple to reduce the complexity between
the observed and the observing objects. If a special
sequence of update notifications is necessary,
you are loosing this advantage of the pattern and
may consider using an explicit update instead.
Using the standard property change pattern with
a specialized update implementation may confuse
users of the API.
Hope this helps,
--
Karsten Lentzsch
www.JGoodies.com - Java User Interface Design
Christian Wenz - 08 Sep 2003 08:32 GMT
>>[...] Is it possible to set an order in which all
>>PropertyChangeListener will be notified?
[quoted text clipped - 19 lines]
> Karsten Lentzsch
> www.JGoodies.com - Java User Interface Design
Thanks for da' help