Catching a right click event on a tabsheet

Hello,

I wish to show a
ContextMenu
on a vaadin tabsheet when the user right clicks it.
Is there an easy way to do this or do i have to overwrite the client widget?

Solved this using the following code:
(if there is a better way i would like to know).

if (JavaScript.getCurrent() != null) {

    //Register the javascript function
    JavaScript.getCurrent().addFunction("showTabContextMenu", new JavaScriptFunction() {
        @Override
        public void call(JSONArray arguments) throws JSONException {
            int x = Integer.parseInt(arguments.get(0).toString());
            int y = Integer.parseInt(arguments.get(1).toString());
            ContextMenu contextMenu = buildContextMenu(tab);
            contextMenu.open(x, y);
        }
    });

    //if the user right mouse buttons on the tab execute the registered javascript function
    JavaScript.eval("$('div.v-tabsheet-tabitem-selected').bind(\"contextmenu\", function(e){ e.preventDefault(); showTabContextMenu(e.clientX, e.clientY);});");
}

I know this is old but I need to open new browser tab or window on tabitem clicked in tabsheet. Need shortcut or right mouse click or something like that…