Package com.prineside.tdi2.scene2d.utils
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>
A selection that supports range selection by knowing about the array of items being selected.
- Author:
- Nathan Sweet
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Selects or deselects the specified item based on how the selection is configured, whether ctrl is currently pressed, etc.boolean
void
setRangeSelect
(boolean rangeSelect) void
validate()
Removes objects from the selection that are no longer in the items array.Methods inherited from class com.prineside.tdi2.scene2d.utils.Selection
add, addAll, clear, contains, fireChangeEvent, first, getLastSelected, getMultiple, getRequired, getToggle, hasItems, isDisabled, isEmpty, items, iterator, notEmpty, remove, removeAll, set, setActor, setAll, setDisabled, setMultiple, setProgrammaticChangeEvents, setRequired, setToggle, size, toArray, toArray, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ArraySelection
-
-
Method Details
-
choose
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. -
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. IfSelection.getRequired()
is true and there is no selected item, the first item is selected.
-