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.