want an idea about focus management
hello ,
iam working on project where i have subsytem called focus management , which has to control focus on the screen . we dont use awt or swing for the focus management . this focus is maintaining the focus on the screen and also need to maintain the details of the components where the focus is present now. for example set focus and get focus like that . but i want some uml diagrams on focus management which must be independent from the other classes of the project . so please assume a navigation system for examople and try to imagine the focus management for it and send me the diagrams . it will be help ful for me a lot . waiting for your views . thanks in advance
[689 byte] By [
iruvuri] at [2007-9-27 22:12:50]

Hi,
You can use Observer Pattern.
Screen is the Observable and Focus Managment is the Observer.
Note that java.util.Observer is an interface, but java.util.Observable
is a class.
If you should use on the screen a class that extends yet another class, it cannot extends also observable.
In this case you must use java.util.Observable by aggregation.
Reply for comments
Hi
Thank you for your solution . but the problem oberser pattern does not fit my architecture.
her i explain you clearly if u got it please try to help me .
focus manger is responsible for the complete focus management of the objects that are displayed on the physical screen with the help of xml files . if you see a navigation system then you get the complete idea . but here what i need is there must be a super class who can control the focus on differnet screen changes of different applications. if any information needed please let me know . thanking you and waiting for your reply.
Thanks ivururi for your comment
Two questions:
1) the problem whit Observer pattern is in the fact that you can have different screens, and for every one you need a different Observer?
In this case there are several Patterns: Abstract Factory, Strategy ...
2) for the sake of semplicity, can you give URLs about examples or description of Navigational Systems!
Waiting for your reply.