Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / September 2003

Tip: Looking for answers? Try searching our database.

PropertyChangeListener

Thread view: 
Christian Wenz - 05 Sep 2003 07:48 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
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.