public class SignatureContextMenu extends Object
SignatureContextMenu
represents the popup menu that is
displayed when the user right clicks on a signature node. A reference
to the SignatureContextMenu
of the PDFViewerBean
can
be obtained with
PDFViewerBean.getSignaturePanel().getSignatureContextMenu()
.
By default, this menu contains a DetailsMenuItem. The contents of the
SignatureContextMenu
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(); SignatureContextMenu contextMenu = viewerBean.getSignaturePanel().getSignatureContextMenu(); JMenuItem menuItem = new JMenuItem("My Menu Item"); contextMenu.getPopupMenu().add(menuItem);
Constructor and Description |
---|
SignatureContextMenu(PDFViewerBean bean) |
Modifier and Type | Method and Description |
---|---|
JMenuItem |
getDetailsMenuItem()
The Details menu item.
|
JPopupMenu |
getPopupMenu()
Returns the actual JPopupMenu.
|
boolean |
isActive()
Returns whether or not the
JPopupMenu for the context menu in
getPopupMenu() is active. |
void |
setActive(boolean active)
Sets whether or not the
JPopupMenu for the context menu in
getPopupMenu() is active. |
public SignatureContextMenu(PDFViewerBean bean)
public JPopupMenu getPopupMenu()
public JMenuItem getDetailsMenuItem()
public void setActive(boolean active)
JPopupMenu
for the context menu in
getPopupMenu()
is active. A JPopupMenu
that is not
active will not be shown when the JPopupMenu
is triggered.active
- true
to set the JPopupMenu
active,
false
otherwisepublic boolean isActive()
JPopupMenu
for the context menu in
getPopupMenu()
is active. A JPopupMenu
that is not
active will not be shown when the JPopupMenu
is triggered.true
if the JPopupMenu is active,
false
otherwise