T
- Top-level menu class to populate (e.g.,
JMenuBar
or JMenu
or
MenuBar
)M
- Hierarchical menu class (e.g., JMenu
or
Menu
)public abstract class AbstractMenuCreator<T,M> extends Object implements MenuCreator<T>
The class differentiates between top-level menu components (such as
JMenuBar
), and hierarchical menu components (such as
JMenu
).
Constructor and Description |
---|
AbstractMenuCreator() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
addLeafToMenu(ShadowMenu shadow,
M target) |
protected abstract void |
addLeafToTop(ShadowMenu shadow,
T target) |
protected abstract M |
addNonLeafToMenu(ShadowMenu shadow,
M target) |
protected abstract M |
addNonLeafToTop(ShadowMenu shadow,
T target) |
protected abstract void |
addSeparatorToMenu(M target) |
protected abstract void |
addSeparatorToTop(T target) |
void |
createMenus(ShadowMenu root,
T target) |
public void createMenus(ShadowMenu root, T target)
createMenus
in interface MenuCreator<T>
protected abstract void addLeafToMenu(ShadowMenu shadow, M target)
protected abstract void addLeafToTop(ShadowMenu shadow, T target)
protected abstract M addNonLeafToMenu(ShadowMenu shadow, M target)
protected abstract M addNonLeafToTop(ShadowMenu shadow, T target)
protected abstract void addSeparatorToMenu(M target)
protected abstract void addSeparatorToTop(T target)
Copyright © 2015–2022 SciJava. All rights reserved.