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