org.richfaces.fragment.contextMenu

## Interface PopupMenuGroup

- All Known Subinterfaces:
    PopupMenu
  All Known Implementing Classes:
    AbstractPopupMenu, RichFacesContextMenu, RichFacesDropDownMenu

      public interface PopupMenuGroup

  Author:
    Jiri Stefek

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `PopupMenuGroup` | `expandGroup(ChoicePicker picker)` Expands group or sub group from this menu, which satisfies the rules given in `picker` param.
    `PopupMenuGroup` | `expandGroup(int index)` Expands group or sub group from this menu, which index equals the given `index` param.
    `PopupMenuGroup` | `expandGroup(String header)` Expands group or sub group from this menu, which text representation matches the given `header` param.
    `void` | `selectItem(ChoicePicker picker)` Selects the menu item from this menu or menu group according to the rules defined in the `picker` param.
    `void` | `selectItem(int index)` Selects the menu item from this menu or menu group according to its index in the list of all menu items.
    `void` | `selectItem(String header)` Selects the menu item from this menu or menu group according to the exact match of its text representation with passed `header` param.

- - ### Method Detail

    - #### selectItem

          void selectItem(ChoicePicker picker)

      Selects the menu item from this menu or menu group according to the rules defined in the `picker` param. Opens menu or sub menu from visible menu, if it is not visible.
      Parameters:
        `picker` - for defining the rules by which the item will be selected
      Throws:
        `IllegalArgumentException` - if there is no such element which satisfies the rules given by `picker`

    - #### selectItem

          void selectItem(String header)

      Selects the menu item from this menu or menu group according to the exact match of its text representation with passed `header` param. Opens menu or sub menu from visible menu, if it is not visible.
      Parameters:
        `header` - text representation of the menu item to be selected
      Throws:
        `IllegalArgumentException` - if there is no such element with text representation matching the given `header`

    - #### selectItem

          void selectItem(int index)

      Selects the menu item from this menu or menu group according to its index in the list of all menu items. Opens menu or sub menu from visible menu, if it is not visible. Items are indexed from 0. A top menu item (the one which is the closest to the root of the popup menu component) has index 0.
      Parameters:
        `index` - zero based index of the item to be selected
      Throws:
        `IllegalArgumentException` - if there is no such element with index `index`

    - #### expandGroup

          PopupMenuGroup expandGroup(ChoicePicker picker)

      Expands group or sub group from this menu, which satisfies the rules given in `picker` param. Opens menu or sub menu from visible menu, if it is not visible.
      Parameters:
        `picker` - object to define which group should be expanded
      Returns:
        the group which was expanded
      Throws:
        `IllegalArgumentException` - if there is no such element which satisfies the rules given by `picker`

    - #### expandGroup

          PopupMenuGroup expandGroup(String header)

      Expands group or sub group from this menu, which text representation matches the given `header` param. Opens menu or sub menu from visible menu, if it is not visible.
      Parameters:
        `header` - the header of the group which should be expanded
      Returns:
        the group which was expanded
      Throws:
        `IllegalArgumentException` - if there is no such element with text representation matching the given `header`

    - #### expandGroup

          PopupMenuGroup expandGroup(int index)

      Expands group or sub group from this menu, which index equals the given `index` param. Opens menu or sub menu from visible menu, if it is not visible.
      Parameters:
        `index` - zero based index of the group to expand
      Returns:
        the group which was expanded
      Throws:
        `IllegalArgumentException` - if there is no such element with index `index`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.