Class GitSubMenu

  • All Implemented Interfaces:
    adams.core.logging.LoggingSupporter, adams.core.SizeOfHandler, Serializable, Comparable<adams.gui.flow.menu.AbstractFlowEditorMenuItem>

    public class GitSubMenu
    extends adams.gui.flow.menu.AbstractFlowEditorMenuItem
    Sub-menu for git actions.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected List<AbstractFlowEditorGitMenuItem> m_MenuItems
      the sub-menu items.
      • Fields inherited from class adams.gui.flow.menu.AbstractFlowEditorMenuItem

        m_Action, m_MenuItem, m_Owner, m_SubMenu
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructors 
      Constructor Description
      GitSubMenu()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addMenuItem​(AbstractFlowEditorGitMenuItem menuitem)
      Adds the menuitem to the sub-menu and the list of managed menuitems.
      String getMenu()
      Returns the name of the menu to list this item under.
      boolean hasAction()
      Returns whether the menu item is based on an action.
      boolean hasSubMenu()
      Returns whether the menu item is based on a submenu.
      protected adams.gui.action.AbstractBaseAction newAction()
      Creates the action to use.
      protected JMenu newSubMenu()
      Creates the submenu to use.
      void update()
      Updating the action/menuitem/submenu, based on the current status of the owner.
      • Methods inherited from class adams.gui.flow.menu.AbstractFlowEditorMenuItem

        compareTo, determineCaption, equals, getAction, getMenuItem, getMenuItems, getOwner, getSubMenu, hasMenuItem, initialize, newMenuItem, setOwner
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
    • Constructor Detail

      • GitSubMenu

        public GitSubMenu()
    • Method Detail

      • hasAction

        public boolean hasAction()
        Returns whether the menu item is based on an action.
        Overrides:
        hasAction in class adams.gui.flow.menu.AbstractFlowEditorMenuItem
        Returns:
        true if action-based
      • newAction

        protected adams.gui.action.AbstractBaseAction newAction()
        Creates the action to use.
        Specified by:
        newAction in class adams.gui.flow.menu.AbstractFlowEditorMenuItem
        Returns:
        the action
      • hasSubMenu

        public boolean hasSubMenu()
        Returns whether the menu item is based on a submenu.
        Overrides:
        hasSubMenu in class adams.gui.flow.menu.AbstractFlowEditorMenuItem
        Returns:
        true if submenu-based
      • addMenuItem

        protected void addMenuItem​(AbstractFlowEditorGitMenuItem menuitem)
        Adds the menuitem to the sub-menu and the list of managed menuitems.
        Parameters:
        menuitem - the menuitem to add
      • newSubMenu

        protected JMenu newSubMenu()
        Creates the submenu to use.
        Overrides:
        newSubMenu in class adams.gui.flow.menu.AbstractFlowEditorMenuItem
        Returns:
        the submenu
      • getMenu

        public String getMenu()
        Returns the name of the menu to list this item under.
        Specified by:
        getMenu in class adams.gui.flow.menu.AbstractFlowEditorMenuItem
        Returns:
        the name of the menu
      • update

        public void update()
        Updating the action/menuitem/submenu, based on the current status of the owner.
        Specified by:
        update in class adams.gui.flow.menu.AbstractFlowEditorMenuItem