Well, you can import any package, and bind it to a namespace prefix as
explained here:

http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Hello_Widget_World

I imagine, that it would also be possible to have an addRect(),
addCircle() method etc in your SVG class (or maybe some wrapper of
that class, if you can't modify it), and use that in UiBinder, but I'm
not 100% sure if simply declaring these methods is enough. You should
certainly try it, and report back, if this works!

Chris


On Mar 11, 8:08 am, Jan Ehrhardt <jan.ehrha...@googlemail.com> wrote:
> Hi,
>
> I would like to extend the UI-Binder to handle custom types. In my case
> these are SVG DOM elements. I would like to do something like:
>
> <g:HorizontalPanel>
>   <SVG>
>     <rect ... />
>     <circle ... />
>   </SVG>
> </g:HorizontalPanel>
>
> In the above example, SVG is a subclass of Widget, that wraps the svgweb
> library (http://code.google.com/p/svgweb/). The 'rect' and 'circle' tags
> should be handled as subclasses  of Element, like 'div' tags in the
> HTMLPanel. Of cause, I want to bind a RectElement object in my Java class to
> the 'rect' tag in my ui.xml file.
>
> I know, that UI-Binder uses deferred binding by parsing the XML and
> generating an implementation of UIBinder interface for compiling, but how
> can I extend this by my own handler for doing the above stuff?
>
> Regards
> Jan Ehrhardt

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@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