APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.scenes.scene2d.utils

public Class ArraySelection<T>

extends Selection<T>
Class Inheritance
Imports
java.util.Iterator, com.badlogic.gdx.utils.Array

A selection that supports range selection by knowing about the array of items being selected.
Author
Nathan Sweet

Field Summary

Modifier and TypeField and Description
private Array<T>
private boolean
private T
Inherited from com.badlogic.gdx.scenes.scene2d.utils.Selection:
isDisabledlastSelectedmultiplerequiredselected

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
changed()

Overrides com.badlogic.gdx.scenes.scene2d.utils.Selection.changed.

Called after the selection changes, clears the range start item.

public void
choose(T item)

Overrides com.badlogic.gdx.scenes.scene2d.utils.Selection.choose.

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.

public boolean
public void
setRangeSelect(boolean rangeSelect)

public void
validate()

Removes objects from the selection that are no longer in the items array.

Inherited from com.badlogic.gdx.scenes.scene2d.utils.Selection:
addaddAllcleanupclearcontainsfireChangeEventfirstgetLastSelectedgetMultiplegetProgrammaticChangeEventsgetRequiredgetTogglehasItemsisDisabledisEmptyitemsiteratornotEmptyremoveremoveAllrevertsetsetActorsetAllsetDisabledsetMultiplesetProgrammaticChangeEventssetRequiredsetTogglesizesnapshottoArraytoArraytoString

Field Detail

arrayback to summary
private Array<T> array
rangeSelectback to summary
private boolean rangeSelect
rangeStartback to summary
private T rangeStart

Constructor Detail

ArraySelectionback to summary
public ArraySelection(Array<T> array)

Method Detail

changedback to summary
protected void changed()

Overrides com.badlogic.gdx.scenes.scene2d.utils.Selection.changed.

Called after the selection changes, clears the range start item.

chooseback to summary
public void choose(T item)

Overrides com.badlogic.gdx.scenes.scene2d.utils.Selection.choose.

Doc from com.badlogic.gdx.scenes.scene2d.utils.Selection.choose.

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.

getRangeSelectback to summary
public boolean getRangeSelect()
setRangeSelectback to summary
public void setRangeSelect(boolean rangeSelect)
validateback to summary
public void validate()

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