public class ContextMenuAdapter extends Object implements ContextMenuListener
Extend this class to create a context menu listener and override the methods
for the context menu events of interest. (If you implement the
ContextMenuListener
interface, you have to define all of the
methods in it. This abstract class defines null methods for them all, so you
can only have to define methods for events you care about.)
Create a listener object using the extended class and then register it with
the ContextMenu
object obtained from the
Map3DWindow
object using its addContextMenuListener
method.
ContextMenuListener
,
ContextMenuEvent
,
ContextMenu
Constructor and Description |
---|
ContextMenuAdapter() |
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.
|
public void contextMenuRequested(ContextMenuEvent e)
contextMenuRequested
in interface ContextMenuListener
e
- the context menu eventContextMenuEvent.consume()
public 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.contextMenuShowing
in interface ContextMenuListener
e
- the context menu eventpublic void contextMenuHidden(ContextMenuEvent e)
contextMenuHidden
in interface ContextMenuListener
e
- the context menu eventCopyright © 2009 - 2016 DataGis. All Rights Reserved.