Class MultipleIndiciesSelection

  • All Implemented Interfaces:
    IUIIndexedSelection, IUISelection

    public class MultipleIndiciesSelection
    extends java.lang.Object
    implements IUIIndexedSelection
    The multiple index-based selection state used by e.g. list items or map markers.
    Christopher Mindus
    • Constructor Detail

      • MultipleIndiciesSelection

        public MultipleIndiciesSelection​(IUISingleIndexedSelectionComp source,
                                         int[] selectedIndicies)
        source - The component source.
        selectedIndicies - The selected indicies, or null for none.
    • Method Detail

      • getUISource

        public UIComp getUISource()
        Gets the UI component being the source of the event.
        Specified by:
        getUISource in interface IUISelection
        The UI component.
      • getFirstSelectedIndex

        public int getFirstSelectedIndex()
        Gets the first selected index.
        Specified by:
        getFirstSelectedIndex in interface IUIIndexedSelection
        The first index in the current selection, or -1 for none.
      • getSelectedIndicies

        public int[] getSelectedIndicies()
        Gets the selected indicies.
        Specified by:
        getSelectedIndicies in interface IUIIndexedSelection
        A new array of the selected indices (that may be modified to your liking), or a static zero in length array for no selection. The array is always sorted from lowest to highest index.
      • equals

        public boolean equals​(java.lang.Object o)

        Note: A single selection can match a multiple selection if both are of no-selection or the same index is selected in both, and the multiple selection indicies array has a length of one.

        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Converts the selection to a string.
        toString in class java.lang.Object