Type Parameters:
T - the value type
All Superinterfaces:
OceanusEventRegistrar.OceanusEventProvider<TethysUIEvent>

public interface TethysUIScrollMenu<T> extends OceanusEventRegistrar.OceanusEventProvider<TethysUIEvent>
ScrollMenu.
  • Method Details

    • getSelectedItem

      TethysUIScrollItem<T> getSelectedItem()
      Obtain the selected value.
      Returns:
      the selected value
    • isEmpty

      boolean isEmpty()
      is the menu empty?
      Returns:
      true/false
    • setMaxDisplayItems

      void setMaxDisplayItems(int pMaxDisplayItems)
      Set the number of items in the scrolling portion of the menu.
      Parameters:
      pMaxDisplayItems - the maximum number of items to display
      Throws:
      IllegalArgumentException - if pMaxDisplayItems is 0 or negative
    • setCloseOnToggle

      void setCloseOnToggle(boolean pCloseOnToggle)
      Set whether menu should auto-close on selection of a toggle item.
      Parameters:
      pCloseOnToggle - true/false
    • removeAllItems

      void removeAllItems()
      Remove all contents.
    • addItem

      TethysUIScrollItem<T> addItem(T pValue)
      Add Element.
      Parameters:
      pValue - the value
      Returns:
      the item added
    • addItem

      TethysUIScrollItem<T> addItem(T pValue, String pName)
      Add Element.
      Parameters:
      pValue - the value
      pName - the display name
      Returns:
      the item added
    • addItem

      TethysUIScrollItem<T> addItem(T pValue, TethysUIIcon pGraphic)
      Add Element.
      Parameters:
      pValue - the value
      pGraphic - the icon for the item
      Returns:
      the item added
    • addNullItem

      TethysUIScrollItem<T> addNullItem(String pName)
      Add Null Element.
      Parameters:
      pName - the display name
      Returns:
      the item added
    • addNullItem

      TethysUIScrollItem<T> addNullItem(String pName, TethysUIIcon pGraphic)
      Add Null Element.
      Parameters:
      pName - the display name
      pGraphic - the icon for the item
      Returns:
      the item added
    • addItem

      TethysUIScrollItem<T> addItem(T pValue, String pName, TethysUIIcon pGraphic)
      Add Element.
      Parameters:
      pValue - the value
      pName - the display name
      pGraphic - the icon for the item
      Returns:
      the item added
    • addSubMenu

      TethysUIScrollSubMenu<T> addSubMenu(String pName)
      Add subMenu.
      Parameters:
      pName - the display name
      Returns:
      the menu added
    • addSubMenu

      TethysUIScrollSubMenu<T> addSubMenu(String pName, TethysUIIcon pGraphic)
      Add subMenu.
      Parameters:
      pName - the display name
      pGraphic - the icon for the menu
      Returns:
      the menu added
    • addToggleItem

      TethysUIScrollToggle<T> addToggleItem(T pItem)
      Add New toggle item.
      Parameters:
      pItem - the available item
      Returns:
      the added item
    • addToggleItem

      TethysUIScrollToggle<T> addToggleItem(T pItem, String pName)
      Add New toggle item.
      Parameters:
      pItem - the available item
      pName - the display name
      Returns:
      the added item