code: private List<MenuItemSelectable> getSelectableItems(final MenuSelectContainer selectContainer) {
  		List<MenuItemSelectable> result = new ArrayList<>(selectContainer.getMenuItems().size());
  
  		SelectionMode selectionMode = selectContainer.getSelectionMode();
  
  		for (MenuItem item : selectContainer.getMenuItems()) {
  			if (item instanceof MenuItemGroup) {
  				for (MenuItem groupItem : ((MenuItemGroup) item).getMenuItems()) {
  					if (isSelectable(groupItem, selectionMode)) {
  						result.add((MenuItemSelectable) groupItem);
  					}
  				}
  			} else if (isSelectable(item, selectionMode)) {
  				result.add((MenuItemSelectable) item);
  			}
  		}
  
  		return result;
  	}
docs: Retrieves the selectable items for the given container.
  
  @param selectContainer the component to search within.
  @return the list of selectable items for the given component. May be empty.