Class ArraySelection<T>

java.lang.Object
com.prineside.tdi2.scene2d.utils.Selection<T>
com.prineside.tdi2.scene2d.utils.ArraySelection<T>
All Implemented Interfaces:
Disableable, Iterable<T>

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

    • ArraySelection

      public ArraySelection(Array<T> array)
  • Method Details

    • 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>
    • 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.