Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Supposed there is an application with multiple windows, like:

Logo splashscreen Connecting... screen Login-usercontrols screen Logging in... screen etc.

Is there a design pattern, which allows to effectively manage all those windows? (to hide previous windows, display a new window etc.)

share|improve this question
    
Questions about a specific technology stack are better asked on StackOverflow. –  thorsten müller Oct 8 '12 at 8:07
    
Ok, I will delete the SWT. The question is about a pattern. –  Skip Oct 8 '12 at 8:09
    
As @thorstenmüller already mentioned, implementation questions are more suitable for Stack Overflow, but you already posted the question there. Please don't post exactly the same question on multiple sites, and give our FAQ a thorough read to see what questions we welcome on Programmers. –  Yannis Rizos Oct 8 '12 at 8:10
    
If you do update your question to be in accordance with our FAQ, please flag it for moderation attention so we can review and re-open it. –  Yannis Rizos Oct 8 '12 at 8:11
2  
I believe there are no patterns for this. It all heavily depends on GUI stack, OS and what exactly do you want your windows to do. –  Euphoric Oct 8 '12 at 8:53

1 Answer 1

up vote 1 down vote accepted

Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.

As an example, consider the implementation of a dialog box to present a collection of widgets such as buttons, menus, and entry fields. There may be dependencies between the widgets in the dialog, e.g., selecting an entry in a list box might change the contents of an entry field.

Such dependencies can be reduced by encapsulating collective behavior in a mediator object. A mediator is responsible for controlling and coordinating the interactions of these objects. The mediator acts as an intermediary and keeps objects in the group from referring to each other explicitly. The objects only know the mediator, thus reducing the number of interconnections.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.