views:

227

answers:

2
+3  A: 

I'd use an Observer. GUIs that auto-update their values when the underlying model/data they represent changes is one of the classic examples of using the Observer pattern.

JeeBee
+1  A: 

When I developed our project, we came up with the Observer and EventListener patterns as you did. I believe that those patterns are the same concept as publish/subscribe pattern. We did choose the EventListener(EventObject) way to make loose-coupling between objects and to make more extensibility of functions for events.

The benefit of the EventListener is that we can add more reasonable event functions(?) to the EventListener based on our event requirements. Please, correct me if it goes wrong direction.

I hope it helps.

Tiger.

Tiger