SWT design decisions [message #449609] |
Thu, 27 January 2005 04:03  |
Eclipse User |
|
|
|
Originally posted by: timtester2000.yahoo.de
Hello,
I worked with SWT for a while and I have some questions about "good"
design.
Most SWT apps & samples pass the application shell, display ... as
parameters
to other components (i.e. dialogs). Is there any reason not to have static
access to them. So I found it pretty straight forward to make all kind of
Components singletons which are MenuBars, SystemTray because the are
unique in
the application. Do I something miss? Maybe performance, etc.?
Please share your thoughts or point me to a source of enlightment.
Thanks
Tim
|
|
|
|
Re: SWT design decisions [message #449713 is a reply to message #449609] |
Thu, 27 January 2005 19:54  |
Eclipse User |
|
|
|
Static access to a display is generally not necessary. Widget.getDisplay()
answers the display for the widget and their is a display field in every
event.
"timtester2000" <timtester2000@yahoo.de> wrote in message
news:ctaaph$qqr$1@www.eclipse.org...
> Hello,
>
> I worked with SWT for a while and I have some questions about "good"
> design.
> Most SWT apps & samples pass the application shell, display ... as
> parameters
> to other components (i.e. dialogs). Is there any reason not to have static
> access to them. So I found it pretty straight forward to make all kind of
> Components singletons which are MenuBars, SystemTray because the are
> unique in
> the application. Do I something miss? Maybe performance, etc.?
>
> Please share your thoughts or point me to a source of enlightment.
>
> Thanks
>
> Tim
>
|
|
|
Powered by
FUDForum. Page generated in 0.03042 seconds