Class BaseMenuVisitor

    • Constructor Detail

      • BaseMenuVisitor

        public BaseMenuVisitor()
    • Method Detail

      • visitEnter

        public boolean visitEnter​(Menus menus)
        Description copied from interface: MenuVisitor
        Visits the top-level menu container. This is the first method invoked when visiting a complete menu tree.
        Specified by:
        visitEnter in interface MenuVisitor
        Parameters:
        menus - the top-level container of the menus that will be visited.
        Returns:
        true if the visitor would like to continue down the tree and visit all children; false if it wants to skip this node. Since this is the root node, returning false from this call will result in no more calls to the visitor.
      • visitLeave

        public void visitLeave​(Menus menus)
        Description copied from interface: MenuVisitor
        Ends the visit of the top-level menu container. This is the last method invoked when visiting a complete menu tree.

        Note that this method is not called if MenuVisitor.visitEnter(Menus) returns false.

        Specified by:
        visitLeave in interface MenuVisitor
        Parameters:
        menus - the top-level container of the menus that will be visited.
      • visitEnter

        public boolean visitEnter​(MenuGroup menuGroup)
        Description copied from interface: MenuVisitor
        Visits a menu group in the tree of menus. A menu group has zero or more MenuItem children.
        Specified by:
        visitEnter in interface MenuVisitor
        Parameters:
        menuGroup - the menu group to visit.
        Returns:
        true if the visitor would like to visit all children of this node; false if it wants to skip this node. A visitor that returns false from this node will not receive any further calls for this node or its descendants. In particular, there will be no corresponding MenuVisitor.visitLeave(MenuGroup) call for this node.
      • visitLeave

        public void visitLeave​(MenuGroup menuGroup)
        Description copied from interface: MenuVisitor
        Visits a menu group in the tree of menus. All descendants of the given menu group have been visited before this method is called.

        Note that this method is not called for a MenuGroup where the MenuVisitor.visitEnter(MenuGroup) method returned false.

        Specified by:
        visitLeave in interface MenuVisitor
        Parameters:
        menuGroup - the menu group to leave.
      • visit

        public void visit​(MenuItemPlain menuItemPlain)
        Description copied from interface: MenuVisitor
        Visits a plain menu item in the tree.
        Specified by:
        visit in interface MenuVisitor
        Parameters:
        menuItemPlain - the plain menu item to visit.
      • visit

        public void visit​(MenuItemCommand menuItemCommand)
        Description copied from interface: MenuVisitor
        Visits a menu item that has an associated command.
        Specified by:
        visit in interface MenuVisitor
        Parameters:
        menuItemCommand - the command menu item to visit.
      • visit

        public void visit​(MenuItemPerspective menuItemPerspective)
        Description copied from interface: MenuVisitor
        Visits a menu item that has an associated perspective.
        Specified by:
        visit in interface MenuVisitor
        Parameters:
        menuItemPerspective - the command menu item to visit.
      • visit

        public void visit​(MenuCustom<?> menuCustom)
        Description copied from interface: MenuVisitor
        Visits a custom menu item in the menu tree.
        Specified by:
        visit in interface MenuVisitor
        Parameters:
        menuCustom - the custom (application provides the widget) menu item to visit.