Is that possible to make custom SWT widget work as native RWT widgets? [message #879087] |
Wed, 30 May 2012 09:46  |
Eclipse User |
|
|
|
Custom SWT/draw2d widgets are drawn from GC, so each update on custom widget would require the transferring of all painting info from client side. For example: updating a custom label widget will transfer information like "draw a rectangle, fill the background, draw the text", while a native RWT lable widget only need to transfer the text string and browser knows how to rendering the label widget with this text string.
For complicated custom SWT widgets such as Nebula widget, this results in a big overhead on traffic. I have looked at RAP clientScripting, but it can only modify the behavior of existing RWT widgets.
My idea is that converting/compiling GC/draw2d drawing code to Javascript code, so the server only needs to transfer the value to browser and browser knows how to draw it.
Is that possible?
Thanks!
[Updated on: Wed, 30 May 2012 09:49] by Moderator
|
|
|
|
Re: Make custom SWT widget work as native RWT widgets? [message #879147 is a reply to message #879115] |
Wed, 30 May 2012 11:50  |
Eclipse User |
|
|
|
Since client scripting still need Javascript for painting, I would like to draw widget directly on HTML5 Canvas using browser widget, then reuse the behavior code in java and pass data to the browser widget whenever it needs redraw. So it looks like a hybrid widget: javascript for rendering and java for behavior.
Thanks!
Xihui
|
|
|
Powered by
FUDForum. Page generated in 0.04611 seconds