public class PageViewContextMenuNotes extends PageViewContextMenu
PageViewContextMenuNotes
represents the popup menu that is
displayed when the user right clicks on the PageViewPanelNotes
and
the Text Selection Tool is not active. A reference to the
PageViewContextMenuNotes
of the PDFNotesBean
can be
obtained with
PDFNotesBean.getPageViewPanelNotes().getPageContextMenuNotes()
.
By default, this menu is composed of: StickyNoteMenuItem, PencilMenuItem, a
JMenu divider, HandToolMenuItem, TextSelectionMenuItem, and ZoomToolMenuItem.
These items may be modified by retrieving them with their individual getter
methods. The contents of the PageViewContextMenuNotes
may be
accessed and modified with the getPopupMenu()
method. For example,
to add a new menu item to the popup menu:
PDFNotesBean notesBean = new PDFNotesBean(); PageViewContextMenuNotes contextMenu = notesBean.getPageViewPanelNotes().getPageContextMenuNotes(); JMenuItem menuItem = new JMenuItem("My Menu Item"); contextMenu.getPopupMenu().add(menuItem);
Constructor and Description |
---|
PageViewContextMenuNotes() |
Modifier and Type | Method and Description |
---|---|
JMenuItem |
getPasteMenuItem()
The Paste menu item.
|
JSeparator |
getPasteSeparator()
Returns the separator that is used after the Pencil tool.
|
JMenuItem |
getPencilMenuItem()
The Add Pencil menu item for the page view context menu.
|
JSeparator |
getPencilSeparator()
Returns the separator that is used after the Pencil tool.
|
JPopupMenu |
getPopupMenu()
Retrieves the actual JPopupMenu with the text markup menu items either visible or not
|
JMenuItem |
getStickyNoteMenuItem()
The Add Sticky Note menu item for the page view context menu.
|
clearSelection, getHandToolMenuItem, getTextSelMenuItem, getZoomToolMenuItem
public JPopupMenu getPopupMenu()
getPopupMenu
in class PageViewContextMenu
public JMenuItem getStickyNoteMenuItem()
public JMenuItem getPencilMenuItem()
public JMenuItem getPasteMenuItem()
public JSeparator getPencilSeparator()
public JSeparator getPasteSeparator()