Marcin Sanecki
Marcin Sanecki

Reputation: 1334

Patterns for screen dynamics, GUI

I code Java/Swing based UI. My dialogs are quite complex and there are many rules for screen dynamics: when to enable/disable buttons, when to allow to edit some fields, etc. In general there are widgets and there are some rules to set them in some state. I am wondering if there are any nice patterns, ideas how to resolve such problems in any standardized way.

Now I still use some flags to determine widget state etc. But with complex dialogs this approach become complicated. there is also a problem with maintenance of such code later. I am waiting for your advices.

Regards, Marcin

Upvotes: 1

Views: 323

Answers (1)

Daniele Teti
Daniele Teti

Reputation: 1774

There is a specific pattern fot this kind of problem, "Mediator". Is One of famous GoF design pattern

Upvotes: 4

Related Questions