Interface IUIIndexedSelectionComp

All Superinterfaces:
IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IMessageBox, IPropCnr, IUIComp, IUISelectionComp, IVSComponentListener, IVSComponentState, IVSFieldListener
All Known Subinterfaces:
IUIAnimatedSingleIndexedSelectionComp, IUIRadioComponent, IUISingleIndexedSelectionComp
All Known Implementing Classes:
AbstractContentUIContainer, EMapMarkers, EMLGroup, EUIAccordion, EUIComboBox, EUIRadioButton, EUIRadioMenuItem, EUISpinner, EUISwapContainer, EUITabContainer, EUITable, MapMarkers, MLGroup, UIAbstractListChoice, UIAccordion, UIComboBox, UIRadioButton, UIRadioMenuItem, UISpinner, UISwapContainer, UITabContainer, UITable

public interface IUIIndexedSelectionComp extends IUISelectionComp
The interface for a selection component supporting index-based selections.
Author:
Christopher Mindus
  • Method Details

    • clearSelection

      String clearSelection()
      Clear the selection.
      Returns:
      null for success, otherwise the error message with the reason why it failed.
    • getFirstSelectedIndex

      int getFirstSelectedIndex()
      Gets the first selected index.
      Returns:
      The first index in the current selection, or -1 for none.
    • getSelectedIndicies

      int[] getSelectedIndicies()
      Gets the selected indicies.
      Returns:
      A new array of the selected indices (that may be modified to your liking), or a static zero in length array for no selection.
    • setSelection

      String setSelection(int index)
      Sets the selection as a single selected item at specified index.
      Parameters:
      index - The single item to select at index, -1 to clear the selection.
      Returns:
      null for success, otherwise an error message why the selection failed.
    • setSelection

      String setSelection(int[] indicies)
      Sets the selection to the specified indicies.
      Parameters:
      indicies - The indicies.
      Returns:
      null for success, otherwise the error message with the reason why it failed.
    • setSelection

      default String setSelection(IntArrayList intArrayList)
      Sets the selection to the specified indicies.
      Parameters:
      intArrayList - The int array of the selection.
      Returns:
      null for success, otherwise the error message with the reason why it failed.
    • setSelection

      default String setSelection(List<Integer> indiciesCollection)
      Sets the selection to the specified indicies.
      Parameters:
      indiciesCollection - The collection of integers of the selection.
      Returns:
      null for success, otherwise the error message with the reason why it failed.
      Throws:
      NullPointerException - If an element in the collection is null.
    • setSelection

      default String setSelection(Collection<Integer> indiciesCollection)
      Sets the selection to the specified indicies.
      Parameters:
      indiciesCollection - The indicies.
      Returns:
      null for success, otherwise the error message with the reason why it failed.
      Throws:
      NullPointerException - If an element in the collection is null.
    • setSelection

      default String setSelection(Iterable<Integer> indiciesIterable)
      Sets the selection to the specified indicies.
      Parameters:
      indiciesIterable - The iterable is used to set the selection to the remaining indicies.
      Returns:
      null for success, otherwise the error message with the reason why it failed.
      Throws:
      NullPointerException - If an element in the iterable elements is null.
    • setSelection

      default String setSelection(Iterator<Integer> indiciesIterator)
      Sets the selection to the specified indicies.
      Parameters:
      indiciesIterator - The iterator is used to set the selection to the remaining indicies.
      Returns:
      null for success, otherwise the error message with the reason why it failed.
      Throws:
      NullPointerException - If an element from the iteration over the iterator is null.
    • isSelectionIndexBased

      default boolean isSelectionIndexBased()
      Returns if the selection component supports index-based selection.
      Specified by:
      isSelectionIndexBased in interface IUISelectionComp
      Returns:
      true.