The best way for you to handle both the click and double click differently would be to handle the double click yourself. So when you get a click, start a timer for X ms (the longest time between clicks for a double click). If the user clicks again, it's a double click, if the timer runs out, single click.
On Apr 14, 9:32 am, lamre <[email protected]> wrote: > Hi, i overrided onBrowserEvent of AbstractCell to handle click and > double click event, the problem is now that when doubleclicking i > cature two click events and a double click event. > I need to handle both of them in a cell but can't distinguish. > Thanks. > > Cell<Node> cell = new AbstractCell<Node>("dblclick","click") > { > > @Override > public void render(Context context, Node value, SafeHtmlBuilder sb) > { > if (value != null) { sb.appendEscaped(value.getNodeName()); > } > } > > @Override > public void onBrowserEvent(Context context, Element parent, Node > value,NativeEvent event, ValueUpdater<Node> valueUpdater) > { > if (value == null) { return; } > super.onBrowserEvent(context, parent, value, event, > valueUpdater); > if ("dblclick".equals(event.getType())) > { > System.out.println("dopio click"); > } > if ("click".equals(event.getType())) > { > System.out.println("singolo click"); > } > } > > > > > > > > } -- 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.
