Hi Malcolm,
I have a question to your solution.
Why are you implementing the onBrowserEvent in your extended Tree class,
why not in an extended TreeItem class?
Regards,
Vincent
Am Montag, 2. Oktober 2006 18:00:27 UTC+2 schrieb edmik:
>
> Hi VS,
> use the provided toolkit double click event is much cleaner. e.g.
> class MyTree extends Tree
> private final MyTree me ;
> /**
> *
> */
> public MyTree()
> {
> super();
> this.me = this ;
> sinkEvents(Event.ONDBLCLICK);
> }
>
> public void onBrowserEvent(Event event)
> {
> super.onBrowserEvent(event);
> if (DOM.eventGetType(event) == Event.ONDBLCLICK)
> {
> DeferredCommand.add( new Command()
> {
> public void execute()
> {
> SomeClass.handleDoubleClick(me);
> }
> });
> }
> }
>
> Then use the selectedItem to get the double clicked tree item.
> Regards,
> Malcolm
>
>
--
You received this message because you are subscribed to the Google Groups "GWT
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.