Package 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.,JMenuBarorJMenuorMenuBar)M- Hierarchical menu class (e.g.,JMenuorMenu)
- 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 asJMenu).- Author:
- Curtis Rueden
-
-
Constructor Summary
Constructors Constructor Description AbstractMenuCreator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddLeafToMenu(ShadowMenu shadow, M target)protected abstract voidaddLeafToTop(ShadowMenu shadow, T target)protected abstract MaddNonLeafToMenu(ShadowMenu shadow, M target)protected abstract MaddNonLeafToTop(ShadowMenu shadow, T target)protected abstract voidaddSeparatorToMenu(M target)protected abstract voidaddSeparatorToTop(T target)voidcreateMenus(ShadowMenu root, T target)
-
-
-
Method Detail
-
createMenus
public void createMenus(ShadowMenu root, T target)
- Specified by:
createMenusin interfaceMenuCreator<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)
-
-