Class Menu

    • Field Detail

      • subItems

        private final java.util.List<MenuItem> subItems
    • Constructor Detail

      • Menu

        public Menu​(java.lang.String label)
        Creates a menu with the specified label
        Parameters:
        label - Label to use for the menu item that will trigger this menu to pop up
    • Method Detail

      • add

        public Menu add​(MenuItem menuItem)
        Adds a new menu item to this menu, this can be either a regular MenuItem or another Menu
        Parameters:
        menuItem - The item to add to this menu
        Returns:
        Itself
      • onActivated

        protected boolean onActivated()
        Description copied from class: MenuItem
        Method to invoke when a menu item is "activated" by pressing the Enter key.
        Overrides:
        onActivated in class MenuItem
        Returns:
        Returns true if the action was performed successfully, otherwise false, which will not automatically close the popup window itself.