Interface ShowContextMenuCallback

All Superinterfaces:
AsyncCallback<ShowContextMenuCallback.Params,ShowContextMenuCallback.Action>, BrowserAsyncCallback<ShowContextMenuCallback.Params,ShowContextMenuCallback.Action>, BrowserCallback, Callback
All Known Implementing Classes:
DefaultShowContextMenuCallback, DefaultShowContextMenuCallback, DefaultShowContextMenuCallback

This callback is invoked when the browser attempts to display a context menu, for example, when the user right-clicks on a misspelled word on the web page.

You can use this callback to display the standard Java popup menu and fill it with the menu items that you can obtain by invoking the ShowContextMenuCallback.Params.customContextMenuItems() method.

The ShowContextMenuCallback.Params contains information about the web page that attempts to show the context menu, the context menu location, the spellchecker result, etc.

Use the ShowContextMenuCallback.Action.select(com.teamdev.jxbrowser.menu.ContextMenuItem) method to select a context menu item and execute the action associated with this item.

Use the ShowContextMenuCallback.Action.close() to close the context menu without selecting any item.

If the callback throws an exception, the ShowContextMenuCallback.Action.close() method will be invoked.