On 18 oct, 21:01, David Renoldner <[email protected]> wrote:
> Hello,
> i’m developing a vector drawing API with GWT in order to provide an
> abstraction over SVG, VML, and since the VML rendering is very slow,
> Flash. Everything works fine but now it’s time to think about event
> handling. As I will use this API to visualize an ontology, which may
> have hundreds of nodes to display, I don’t want to attach an event
> listener to each drawn element (eg. Rectangle). So I think the best
> approach is to attach one listener (eg. ClickListener) to the scene
> and calculate which element has been clicked. But in this case, I will
> only get the DOM element back, but I need the object for further
> calculation.
Have a look at how the Tree widget deals with events (it does not
attach handlers to each TreeItem):
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/client/ui/Tree.java#876
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---