Class 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
    • Constructor Detail

      • AbstractMenuCreator

        public AbstractMenuCreator()
    • Method Detail

      • 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)