[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-swt-dev] How to trigger all widgets to do customized action?
|
There are some customzied SWT widget classes which all have a customzied
method refresh().
The refresh() method will change status of widget objects, and it is
time-costing.
How to call this method of all widget instances?
Of course I can register each widget to a registry in constructor as
Listener Pattern, but it needs maintaining a list of reference to all
widget objects. Since each SWT widget is hosted on its parent widget,
perhaps the list of reference is unnecessary.
Is it possible to do it as below?
Call a standard SWT method of Shell or Display, which send event to all
widgets. Those customzied widgets listens to this event and call its own
refresh() method.
The problem is:
1) which event can be used to take this job? Since the refresh() is
time-costing, PaintEvent is not a good choice.
2) which SWT method of Shello of Display can trigger such a event?