Where is this sinkEvents from?

class SafeHtmlCellWithContextMenu<T> extends SafeHtmlCell {
  public Set<String> getConsumedEvents() { return 
Collections.singleton("contextmenu"); }

  public void onBrowserEvent(Cell.Context context, Element parent, SafeHtml 
value, NativeEvent event, ValueUpdater<SafeHtml> valueUpdater) {
    // here, event.getType() should be "contextmenu"
  }
}

Then use with: new Header(new SafeHtmlCellWithContextMenu());

(best IMO would be to turn the above into a generic Cell that can wrap any 
other Cell, delegating everything to the wrapped cell, except for 
getConsumedEvents to add "contextmenu" to the list, and onBrowserEvent to 
handle the "contextmenu")

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ngU5DlWGUnkJ.
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.

Reply via email to