public class AWTMenuBarCreator extends AbstractAWTMenuCreator<MenuBar>
MenuBar
with menu items from a ShadowMenu
.
Unfortunately, the AWTMenuBarCreator
, AWTMenuCreator
and
AWTPopupMenuCreator
classes must all exist and replicate some code,
because MenuBar
, MenuItem
and PopupMenu
do not share
a common interface for operations such as Menu.add(java.awt.MenuItem)
.
This class is called AWTMenuBarCreator
rather than simply
MenuBarCreator
for consistency with other UI implementations such as
AWTMenuCreator
.
Constructor and Description |
---|
AWTMenuBarCreator() |
Modifier and Type | Method and Description |
---|---|
protected void |
addLeafToTop(ShadowMenu shadow,
MenuBar target) |
protected Menu |
addNonLeafToTop(ShadowMenu shadow,
MenuBar target) |
protected void |
addSeparatorToTop(MenuBar target) |
addLeafToMenu, addNonLeafToMenu, addSeparatorToMenu, createLeaf, createNonLeaf
createMenus
protected void addLeafToTop(ShadowMenu shadow, MenuBar target)
addLeafToTop
in class AbstractMenuCreator<MenuBar,Menu>
protected Menu addNonLeafToTop(ShadowMenu shadow, MenuBar target)
addNonLeafToTop
in class AbstractMenuCreator<MenuBar,Menu>
protected void addSeparatorToTop(MenuBar target)
addSeparatorToTop
in class AbstractMenuCreator<MenuBar,Menu>
Copyright © 2015–2022 SciJava. All rights reserved.