com.qoppa.pdfViewer.contextmenus
Class TextSelectionContextMenu

java.lang.Object
  extended by com.qoppa.pdfViewer.contextmenus.TextSelectionContextMenu
Direct Known Subclasses:
TextSelectionContextMenuNotes

public class TextSelectionContextMenu
extends Object

The TextSelectionContextMenu represents the popup menu that is displayed when the user right clicks on the PageViewPanel and the Text Selection Tool is active. A reference to the TextSelectionContextMenu of the PDFViewerBean can be obtained with PDFViewerBean.getPageViewPanel().getTextSelectionContextMenu(). By default, this menu is composed of: CopyMenuItem, a JMenu divider, OpenLinkMenuItem, a JMenu divider HandToolMenuItem, TextSelectionMenuItem, and ZoomToolMenuItem. These items may be modified by retrieving them with their individual getter methods. The contents of the TextSelectionContextMenu may be accessed and modified with the getPopupMenu() method. For example, to add a new menu item to the popup menu:

 PDFViewerBean viewerBean = new PDFViewerBean();
 TextSelectionContextMenu contextMenu = viewerBean.getPageViewPanel().getTextSelectionContextMenu();
 JMenuItem menuItem = new JMenuItem("My Menu Item");
 contextMenu.getPopupMenu().add(menuItem);
 

Author:
Qoppa Software

Constructor Summary
TextSelectionContextMenu()
           
 
Method Summary
 JMenuItem getCopyMenuItem()
          Returns the CopyToClipboard menu item for the text selection context menu.
 JSeparator getCopySeparator()
           
 JCheckBoxMenuItem getHandToolMenuItem()
          The Hand Tool menu item for the page view context menu.
 JSeparator getLinkSeparator()
           
 JMenuItem getOpenLinkMenuItem()
           
 JPopupMenu getPopupMenu()
           
 JCheckBoxMenuItem getTextSelMenuItem()
          The Text Select menu item for the page view context menu.
 JCheckBoxMenuItem getZoomToolMenuItem()
          The Zoom Tool menu item for the page view context menu.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextSelectionContextMenu

public TextSelectionContextMenu()
Method Detail

getPopupMenu

public JPopupMenu getPopupMenu()

getCopySeparator

public JSeparator getCopySeparator()

getLinkSeparator

public JSeparator getLinkSeparator()

getCopyMenuItem

public JMenuItem getCopyMenuItem()
Returns the CopyToClipboard menu item for the text selection context menu. This item is mutable, its setVisible(...) method may be called to change the visibility of this item in the JPopupMenu, setText(...) will modify the label of the corresponding JPopupMenu menuItem, etc.

Returns:
Zoom Tool menu item

getOpenLinkMenuItem

public JMenuItem getOpenLinkMenuItem()

getHandToolMenuItem

public JCheckBoxMenuItem getHandToolMenuItem()
The Hand Tool menu item for the page view context menu. This item is the actual item used by the JPopupMenu, so it is mutable; the setVisible(...) method may be called to change the visibility of this item in the JPopupMenu, setText(...) will modify the label of the corresponding menuItem, etc.

Returns:
Hand Tool menu item

getTextSelMenuItem

public JCheckBoxMenuItem getTextSelMenuItem()
The Text Select menu item for the page view context menu. This item is the actual item used by the JPopupMenu, so it is mutable; the setVisible(...) method may be called to change the visibility of this item in the JPopupMenu, setText(...) will modify the label of the corresponding menuItem, etc.

Returns:
Text Select menu item

getZoomToolMenuItem

public JCheckBoxMenuItem getZoomToolMenuItem()
The Zoom Tool menu item for the page view context menu. This item is the actual item used by the JPopupMenu, so it is mutable; the setVisible(...) method may be called to change the visibility of this item in the JPopupMenu, setText(...) will modify the label of the corresponding menuItem, etc.

Returns:
Zoom Tool menu item