>
>
> constructor 
> protected CanvasElement() 
>
> It means that you can derive your own class for CanvasElement. 
> Adding it in a GWT container works for me. 
>
> I agree with you : I don't understand why there is also a Canvas 
> class, and why the constructor is private ? 
>
>
Canvas is a Widget (derives from FocusWidget).
CanvasElement is just a wrapper around the DOM element <canvas> (derives 
com.google.gwt.dom.client.Element).
To be precise, CanvasElement is not even a wrapper it is a JavaScriptObject 
which means that you can not create it in Java (by calling a constructor).
Instead, we have to use Document.get().createCanvasElement() which does its 
work by calling a JSNI method.
I want the widget so that I can do all the event handling in Java 
(FocusWidget implements tons of Has*Handlers interfaces). 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ivqyX2eFKScJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to