[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] How to trigger all widgets to do customized action?
|
It is possible to get all shells from display (Display.getShells()) and
then you could
walk the shell's widget hierarchy with (Composite.getChildren()).
Silenio
Cheng Mo <w21009@xxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
08/23/2004 01:10 AM
Please respond to
platform-swt-dev
To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[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?
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev