S
Shravan Kumar Durvasula
Hi all:
Here (http://www.erc.msstate.edu/~shravan/Hierarchy_files/slide0001.htm)
is the hierarchy of the Java Swing application i want to develop. I
have a "MainFrame" which has three panels (A, B and C). Those panels
have sub panels ((A1, A2) (B1, B2) (C1, C2)). I have objects (which i
am actually planning to implement as independent pluggable components
using the "Observer" pattern) on these sub panels.
Now let us say an event happens on "Obj O1" (changes state) and this
should trigger a change on "Obj O10" and "Obj O12". What is the best
way to implement this? I mean .. how can we transfer a message from an
object somewhere in the tree to another object somewhere else in the
tree? Because i am implementing object O1 as pluggable component
(using Observer pattern), i can add O10 and O12 as listeners
(Observers) to it. But, how can i get the reference of O10 and O12 in
the panel A1?
Could anyone please advice?
Thanks a lot in advance,
Shravan
Here (http://www.erc.msstate.edu/~shravan/Hierarchy_files/slide0001.htm)
is the hierarchy of the Java Swing application i want to develop. I
have a "MainFrame" which has three panels (A, B and C). Those panels
have sub panels ((A1, A2) (B1, B2) (C1, C2)). I have objects (which i
am actually planning to implement as independent pluggable components
using the "Observer" pattern) on these sub panels.
Now let us say an event happens on "Obj O1" (changes state) and this
should trigger a change on "Obj O10" and "Obj O12". What is the best
way to implement this? I mean .. how can we transfer a message from an
object somewhere in the tree to another object somewhere else in the
tree? Because i am implementing object O1 as pluggable component
(using Observer pattern), i can add O10 and O12 as listeners
(Observers) to it. But, how can i get the reference of O10 and O12 in
the panel A1?
Could anyone please advice?
Thanks a lot in advance,
Shravan