com.qoppa.pdfNotes.contextmenus
Class PageViewContextMenuNotes

java.lang.Object
  extended by com.qoppa.pdfViewer.contextmenus.PageViewContextMenu
      extended by com.qoppa.pdfNotes.contextmenus.PageViewContextMenuNotes

public class PageViewContextMenuNotes
extends PageViewContextMenu

The 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);
 

Author:
Qoppa Software

Constructor Summary
PageViewContextMenuNotes()
           
 
Method Summary
 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.
 
Methods inherited from class com.qoppa.pdfViewer.contextmenus.PageViewContextMenu
clearSelection, getHandToolMenuItem, getTextSelMenuItem, getZoomToolMenuItem
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageViewContextMenuNotes

public PageViewContextMenuNotes()
Method Detail

getPopupMenu

public JPopupMenu getPopupMenu()
Retrieves the actual JPopupMenu with the text markup menu items either visible or not

Overrides:
getPopupMenu in class PageViewContextMenu

getStickyNoteMenuItem

public JMenuItem getStickyNoteMenuItem()
The Add Sticky Note menu item for the page view context menu.

Returns:
Add Sticky Note menu item

getPencilMenuItem

public JMenuItem getPencilMenuItem()
The Add Pencil menu item for the page view context menu.

Returns:
Add Pencil menu item

getPasteMenuItem

public JMenuItem getPasteMenuItem()
The Paste menu item. This menu item is enabled only if a the system clipboard contains paste-able content

Returns:
Paste menu item

getPencilSeparator

public JSeparator getPencilSeparator()
Returns the separator that is used after the Pencil tool.

Returns:
The JSeparator object that is added after the pencil tool

getPasteSeparator

public JSeparator getPasteSeparator()
Returns the separator that is used after the Pencil tool.

Returns:
The JSeparator object that is added after the pencil tool