public interface ContextMenuListener extends EventListener
ContextMenuAdapter
class (overriding only the methods of
interest). The listener object created from that class is then registered
with the ContextMenu
using the
addContextMenuListener
method. When the context menu is
requested by the user (by pressing the "right" mouse key), showing or hidden,
the relevant method in the listener object is invoked, and the
ContextMenuEvent
is passed to it.ContextMenuAdapter
,
ContextMenuEvent
,
ContextMenu
Modifier and Type | Method and Description |
---|---|
void |
contextMenuHidden(ContextMenuEvent e)
Invoked when the context menu was rendered invisible.
|
void |
contextMenuRequested(ContextMenuEvent e)
Invoked when the context menu was requested by the user.
|
void |
contextMenuShowing(ContextMenuEvent e)
Invoked when the context menu is about to be shown.
|
void contextMenuRequested(ContextMenuEvent e)
e
- the context menu eventContextMenuEvent.consume()
void contextMenuShowing(ContextMenuEvent e)
CONTEXT_MENU_REQUESTED
, invoked through method
contextMenuRequested
, it also occurs before the context menu
is actually shown, but process of showing the context menu cannot be
canceled during this event.e
- the context menu eventvoid contextMenuHidden(ContextMenuEvent e)
e
- the context menu eventCopyright © 2009 - 2016 DataGis. All Rights Reserved.