Package adams.gui.flow.menu
Class GitSubMenu
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.flow.menu.AbstractFlowEditorMenuItem
-
- adams.gui.flow.menu.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.AbstractFlowEditorMenuItemSub-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_MenuItemsthe sub-menu items.
-
Constructor Summary
Constructors Constructor Description GitSubMenu()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddMenuItem(AbstractFlowEditorGitMenuItem menuitem)Adds the menuitem to the sub-menu and the list of managed menuitems.StringgetMenu()Returns the name of the menu to list this item under.booleanhasAction()Returns whether the menu item is based on an action.booleanhasSubMenu()Returns whether the menu item is based on a submenu.protected adams.gui.action.AbstractBaseActionnewAction()Creates the action to use.protected JMenunewSubMenu()Creates the submenu to use.voidupdate()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
-
-
-
-
Field Detail
-
m_MenuItems
protected List<AbstractFlowEditorGitMenuItem> m_MenuItems
the sub-menu items.
-
-
Method Detail
-
hasAction
public boolean hasAction()
Returns whether the menu item is based on an action.- Overrides:
hasActionin classadams.gui.flow.menu.AbstractFlowEditorMenuItem- Returns:
- true if action-based
-
newAction
protected adams.gui.action.AbstractBaseAction newAction()
Creates the action to use.- Specified by:
newActionin classadams.gui.flow.menu.AbstractFlowEditorMenuItem- Returns:
- the action
-
hasSubMenu
public boolean hasSubMenu()
Returns whether the menu item is based on a submenu.- Overrides:
hasSubMenuin classadams.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:
newSubMenuin classadams.gui.flow.menu.AbstractFlowEditorMenuItem- Returns:
- the submenu
-
getMenu
public String getMenu()
Returns the name of the menu to list this item under.- Specified by:
getMenuin classadams.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:
updatein classadams.gui.flow.menu.AbstractFlowEditorMenuItem
-
-