public class SwingJPopupMenuCreator extends AbstractSwingMenuCreator<JPopupMenu>
JPopupMenu with menu items from a ShadowMenu.
Unfortunately, the SwingJMenuBarCreator, SwingJMenuCreator
and SwingJPopupMenuCreator classes must all exist and replicate some
code, because JMenuBar, JMenuItem and JPopupMenu do
not share a common interface for operations such as JMenu.add(javax.swing.JMenuItem).
This class is called SwingJPopupMenuCreator rather than simply
JPopupMenuCreator for consistency with other UI implementations
such as imagej.ui.awt.menu.AWTPopupMenuCreator.
| Constructor and Description |
|---|
SwingJPopupMenuCreator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLeafToTop(ShadowMenu shadow,
JPopupMenu target) |
protected JMenu |
addNonLeafToTop(ShadowMenu shadow,
JPopupMenu target) |
protected void |
addSeparatorToTop(JPopupMenu target) |
addLeafToMenu, addNonLeafToMenu, addSeparatorToMenu, createLeaf, createMenus, createNonLeafprotected void addLeafToTop(ShadowMenu shadow, JPopupMenu target)
addLeafToTop in class AbstractMenuCreator<JPopupMenu,JMenu>protected JMenu addNonLeafToTop(ShadowMenu shadow, JPopupMenu target)
addNonLeafToTop in class AbstractMenuCreator<JPopupMenu,JMenu>protected void addSeparatorToTop(JPopupMenu target)
addSeparatorToTop in class AbstractMenuCreator<JPopupMenu,JMenu>Copyright © 2015–2022 SciJava. All rights reserved.