public class SwingJMenuCreator extends AbstractSwingMenuCreator<JMenu>
JMenu 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 SwingJMenuCreator rather than simply
JMenuCreator for consistency with other UI implementations such as
imagej.ui.awt.menu.AWTMenuCreator.
| Constructor and Description |
|---|
SwingJMenuCreator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLeafToTop(ShadowMenu shadow,
JMenu target) |
protected JMenu |
addNonLeafToTop(ShadowMenu shadow,
JMenu target) |
protected void |
addSeparatorToTop(JMenu target) |
addLeafToMenu, addNonLeafToMenu, addSeparatorToMenu, createLeaf, createMenus, createNonLeafprotected void addLeafToTop(ShadowMenu shadow, JMenu target)
addLeafToTop in class AbstractMenuCreator<JMenu,JMenu>protected JMenu addNonLeafToTop(ShadowMenu shadow, JMenu target)
addNonLeafToTop in class AbstractMenuCreator<JMenu,JMenu>protected void addSeparatorToTop(JMenu target)
addSeparatorToTop in class AbstractMenuCreator<JMenu,JMenu>Copyright © 2015–2022 SciJava. All rights reserved.