org.scijava.menu
Class AbstractMenuCreator<T,M>
java.lang.Object
org.scijava.menu.AbstractMenuCreator<T,M>
- Type Parameters:
T
- Top-level menu class to populate (e.g.,
JMenuBar
or JMenu
or
MenuBar
)M
- Hierarchical menu class (e.g., JMenu
or
Menu
)
- All Implemented Interfaces:
- MenuCreator<T>
public abstract class AbstractMenuCreator<T,M>
- extends Object
- implements MenuCreator<T>
Abstract helper class for generating a menu structure.
The class differentiates between top-level menu components (such as
JMenuBar
), and hierarchical menu components (such as
JMenu
).
- Author:
- Curtis Rueden
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMenuCreator
public AbstractMenuCreator()
createMenus
public void createMenus(ShadowMenu root,
T target)
- Specified by:
createMenus
in interface MenuCreator<T>
addLeafToMenu
protected abstract void addLeafToMenu(ShadowMenu shadow,
M target)
addLeafToTop
protected abstract void addLeafToTop(ShadowMenu shadow,
T target)
addNonLeafToMenu
protected abstract M addNonLeafToMenu(ShadowMenu shadow,
M target)
addNonLeafToTop
protected abstract M addNonLeafToTop(ShadowMenu shadow,
T target)
addSeparatorToMenu
protected abstract void addSeparatorToMenu(M target)
addSeparatorToTop
protected abstract void addSeparatorToTop(T target)
Copyright © 2009–2014 SciJava. All rights reserved.