Custom widgets [message #66472] |
Fri, 14 December 2007 09:45  |
Eclipse User |
|
|
|
Originally posted by: andy.willem.willem.de
Hi,
I made your great Custom Widget Tutorial from the Eclipse Help Site. But
from different posts here in this group, I realized that it is not
required to create the UI in Javascript. Instead I can just create the
widget in Java, using the SWT Layoutmanagers etc.. and doing a great
component all without ever knowing about Javascript at all.
So why should I work with Javascript, when I can do all this fine stuff
wihtout?
Just a question which is flying through my mind at the moment.
Bye!
Andy
|
|
|
Re: Custom widgets [message #66785 is a reply to message #66472] |
Sun, 16 December 2007 19:34  |
Eclipse User |
|
|
|
Hi Andy,
the answer is the same as in SWT. You need to be aware of the difference
between custom (owner-drawn) widgets and compound widgets.
On the one side, you can create new widgets by combining different
widgets (like a date chooser which consists of a text widgets, shell,
several buttons/labels, etc). The other side (owner-drawn widgets) like
for example a textfield need some special things which cannot be
implemented in java itself. These widgets are using native code in SWT
and for example the browser textfield in RWT.
And that's the whole difference. As long as you can combine existing
widgets you can implement them in java (these can also be reused in SWT
as well). If you need some special behavior or if you need to "draw"
your widget yourself (think of a clock widget) you need to implement it
in javascript.
Hope that helps
Benny
Andy Willem wrote:
> Hi,
>
> I made your great Custom Widget Tutorial from the Eclipse Help Site. But
> from different posts here in this group, I realized that it is not
> required to create the UI in Javascript. Instead I can just create the
> widget in Java, using the SWT Layoutmanagers etc.. and doing a great
> component all without ever knowing about Javascript at all. So why
> should I work with Javascript, when I can do all this fine stuff wihtout?
> Just a question which is flying through my mind at the moment.
>
> Bye!
>
> Andy
>
|
|
|
Powered by
FUDForum. Page generated in 0.02703 seconds