public class BookmarkContextMenu extends Object
BookmarkContextMenu
represents the context menu displayed
when a user right-clicks on a bookmark in BookmarkPanelEditor
.
There is one instance of this class per PDFEditorBean
. It can be retrieved with
PDFEditorBean.getBookmarkPanelEditor().getBookmarkContextMenu()
.
The contents of the
BookmarkContextMenu
may be accessed and modified with the
getPopupMenu()
method. For example, to add a new menu item to
the popup menu:
PDFEditorBean editorBean = new PDFEditorBean(); BookmarkContextMenu contextMenu = editorBean.getBookmarkPanelEditor().getBookmarkContextMenu(); JMenuItem menuItem = new JMenuItem("My Menu Item"); contextMenu.getPopupMenu().add(menuItem);The visibility and enabled state of the preset menu items is adjusted each time the
JPopupMenu
is displayed. The behavior of these
adjustments is documented on each individual getter method. If a developer
desires a different behavior for a particular item, they may remove the item
and add their own. Or, they can add a PopupMenuListener
to the
JPopupMenu
. Their Listener
will be notified after
any adjustments have been completed, and they can make adjustments as they
wish.Constructor and Description |
---|
BookmarkContextMenu() |
Modifier and Type | Method and Description |
---|---|
JMenuItem |
getAddAfterMenuItem()
The AddAfterMenuItem.
|
JMenuItem |
getAddBeforeMenuItem()
The AddBeforeMenuItem.
|
JMenuItem |
getAddChildMenuItem()
The AddChildMenuItem.
|
JMenu |
getAddMenu()
The AddMenu.
|
JSeparator |
getAddMenuSeparator()
The AddMenuSeparator.
|
JMenuItem |
getCutMenuItem()
The CutMenuItem.
|
JMenuItem |
getDeleteMenuItem()
The DeleteMenuItem.
|
JMenuItem |
getPasteAfterMenuItem()
The PasteAfterMenuItem.
|
JMenuItem |
getPasteMenuItem()
The PasteMenuItem.
|
JPopupMenu |
getPopupMenu()
Returns the actual JPopupMenu.
|
JMenuItem |
getPropertiesMenuItem()
The PropertiesMenuItem.
|
JMenuItem |
getRenameMenuItem()
The RenameMenuItem.
|
JMenuItem |
getSetDestinationMenuItem()
The SetDestinationMenuItem.
|
JSeparator |
getSetDestinationSeparator()
The SetDestinationSeparator.
|
public JPopupMenu getPopupMenu()
public JMenuItem getCutMenuItem()
public JMenuItem getPasteMenuItem()
public JMenuItem getPasteAfterMenuItem()
public JMenuItem getDeleteMenuItem()
public JMenuItem getRenameMenuItem()
public JMenuItem getPropertiesMenuItem()
public JMenuItem getSetDestinationMenuItem()
public JMenu getAddMenu()
public JMenuItem getAddBeforeMenuItem()
public JMenuItem getAddAfterMenuItem()
public JMenuItem getAddChildMenuItem()
public JSeparator getAddMenuSeparator()
public JSeparator getSetDestinationSeparator()