Interface UIMenuBuilder


  • public interface UIMenuBuilder
    Encapsulates access and mutation for a menu hierarchy.
    • Method Detail

      • actionForIdentifier

        UIAction actionForIdentifier​(java.lang.String identifier)
        Fetch the identified action.
        Parameters:
        identifier - The identifier of the action to fetch.
        Returns:
        The action with the given identifier, or `nil` if no such action.
      • commandForActionPropertyList

        UICommand commandForActionPropertyList​(org.moe.natj.objc.SEL action,
                                               java.lang.Object propertyList)
        Fetch the identified command.
        Parameters:
        action - The action of the command to fetch.
        propertyList - Property list object to distinguish commands, if needed.
        Returns:
        The command with the given action and property list, or `nil` if no such command.
      • insertChildMenuAtEndOfMenuForIdentifier

        void insertChildMenuAtEndOfMenuForIdentifier​(UIMenu childMenu,
                                                     java.lang.String parentIdentifier)
        Insert a child menu at the end of an identified parent menu.
        Parameters:
        childGroup - The child menu to insert.
        parentIdentifier - The identifier of the parent menu to insert at the end of.
      • insertChildMenuAtStartOfMenuForIdentifier

        void insertChildMenuAtStartOfMenuForIdentifier​(UIMenu childMenu,
                                                       java.lang.String parentIdentifier)
        Insert a child menu at the start of an identified parent menu.
        Parameters:
        childGroup - The child menu to insert.
        parentIdentifier - The identifier of the parent menu to insert at the start of.
      • insertSiblingMenuAfterMenuForIdentifier

        void insertSiblingMenuAfterMenuForIdentifier​(UIMenu siblingMenu,
                                                     java.lang.String siblingIdentifier)
        Insert a sibling menu after an identified sibling menu.
        Parameters:
        siblingGroup - The sibling menu to insert.
        siblingIdentifier - The identifier of the sibling menu to insert after.
      • insertSiblingMenuBeforeMenuForIdentifier

        void insertSiblingMenuBeforeMenuForIdentifier​(UIMenu siblingMenu,
                                                      java.lang.String siblingIdentifier)
        Insert a sibling menu before an identified sibling menu.
        Parameters:
        siblingGroup - The sibling menu to insert.
        siblingIdentifier - The identifier of the sibling menu to insert before.
      • menuForIdentifier

        UIMenu menuForIdentifier​(java.lang.String identifier)
        Fetch the identified menu.
        Parameters:
        identifier - The identifier of the menu to fetch.
        Returns:
        The menu with the given identifier, or `nil` if no such menu.
      • removeMenuForIdentifier

        void removeMenuForIdentifier​(java.lang.String removedIdentifier)
        Remove an identified menu.
        Parameters:
        removedIdentifier - The menu to remove.
      • replaceChildrenOfMenuForIdentifierFromChildrenBlock

        void replaceChildrenOfMenuForIdentifierFromChildrenBlock​(java.lang.String parentIdentifier,
                                                                 UIMenuBuilder.Block_replaceChildrenOfMenuForIdentifierFromChildrenBlock childrenBlock)
        Replace the children of an identified parent menu.
        Parameters:
        parentIdentifier - The identifier of the parent menu.
        childrenBlock - A block that returns the new children, given the old children.
      • replaceMenuForIdentifierWithMenu

        void replaceMenuForIdentifierWithMenu​(java.lang.String replacedIdentifier,
                                              UIMenu replacementMenu)
        Replace an identified menu with a menu.
        Parameters:
        replacedIdentifier - The identifier of the menu to be replaced.
        replacementGroup - The replacement menu.
      • system

        UIMenuSystem system()
        Which system we are building for.