Interface ShowContextMenuHandler
- All Superinterfaces:
EventHandler
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Executed when the right mouse button is clicked.
-
Method Details
-
onShowContextMenu
Executed when the right mouse button is clicked. The default implementation of this method auto-creates aMenu
from theCanvas.contextMenu
property on this component and then callsMenu.showContextMenu()
on it to show it.If you want to show a standard context menu, you can simply define your Menu and set it as the contextMenu property on your component - you do not need to override this method.
If you want to do some other processing before showing a menu or do something else entirely, then you should override this method. Note that the return value from this method controls whether or not the native browser context menu is shown.
- Parameters:
event
- the event
-