Class ArraySelection<T>

  • All Implemented Interfaces:
    Disableable, java.lang.Iterable<T>

    public class ArraySelection<T>
    extends Selection<T>
    A selection that supports range selection by knowing about the array of items being selected.
    • Constructor Detail

      • ArraySelection

        public ArraySelection​(Array<T> array)
    • Method Detail

      • choose

        public void choose​(T item)
        Description copied from class: Selection
        Selects or deselects the specified item based on how the selection is configured, whether ctrl is currently pressed, etc. This is typically invoked by user interaction.
        Overrides:
        choose in class Selection<T>
      • changed

        protected void changed()
        Called after the selection changes, clears the range start item.
        Overrides:
        changed in class Selection<T>
      • getRangeSelect

        public boolean getRangeSelect()
      • setRangeSelect

        public void setRangeSelect​(boolean rangeSelect)
      • validate

        public void validate()
        Removes objects from the selection that are no longer in the items array. If Selection.getRequired() is true and there is no selected item, the first item is selected.