ChangeEvent is fired when the list selection changes.
The preferred size of the list is determined by the text bounds of the items and the size of the ListStyle#selection.
| Modifier and Type | Class and Description |
|---|---|
| public static class | List.
The style for a list, see |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private Rectangle | |
| pack-priv float | |
| pack-priv final Array | |
| private InputListener | |
| pack-priv int | |
| private float | |
| private float | |
| pack-priv int | |
| pack-priv ArraySelection | |
| pack-priv List. | |
| pack-priv boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | draw(Batch batch, float parentAlpha)
Overrides com. If this method is overridden, the super method or |
| protected void | |
| protected GlyphLayout | |
| protected void | |
| public int | |
| public Rectangle | |
| public T | |
| public float | |
| public int | |
| public Array | |
| public InputListener | |
| public T | |
| public float | |
| public float | |
| public T | |
| public T | |
| public int | |
| public ArraySelection | |
| public List. | getStyle()
Implements com. Returns the list's style. |
| public void | layout()
Overrides com. Implements com. Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child,
calls |
| public void | |
| public void | setCullingArea(Rectangle cullingArea)
Implements com.
|
| public void | |
| public void | |
| public void | setSelected(T
May be null. item)Sets the selection to only the passed item, if it is a possible choice. |
| public void | |
| public void | |
| public void | setStyle(List.
Implements com. Set the current style of the actor |
| public void | |
| public String |
| alignment | back to summary |
|---|---|
| private int alignment | |
| cullingArea | back to summary |
|---|---|
| private Rectangle cullingArea | |
| itemHeight | back to summary |
|---|---|
| pack-priv float itemHeight | |
| items | back to summary |
|---|---|
| pack-priv final Array<T> items | |
| keyListener | back to summary |
|---|---|
| private InputListener keyListener | |
| overIndex | back to summary |
|---|---|
| pack-priv int overIndex | |
| prefHeight | back to summary |
|---|---|
| private float prefHeight | |
| prefWidth | back to summary |
|---|---|
| private float prefWidth | |
| pressedIndex | back to summary |
|---|---|
| pack-priv int pressedIndex | |
| selection | back to summary |
|---|---|
| pack-priv ArraySelection<T> selection | |
| style | back to summary |
|---|---|
| pack-priv List. | |
| typeToSelect | back to summary |
|---|---|
| pack-priv boolean typeToSelect | |
| List | back to summary |
|---|---|
| public List(Skin skin) | |
| List | back to summary |
|---|---|
| public List(Skin skin, String styleName) | |
| List | back to summary |
|---|---|
| public List(List. | |
| clearItems | back to summary |
|---|---|
| public void clearItems() | |
| draw | back to summary |
|---|---|
| public void draw(Batch batch, float parentAlpha) Overrides com. Doc from com. If this method is overridden, the super method or | |
| drawBackground | back to summary |
|---|---|
| protected void drawBackground(Batch batch, float parentAlpha) Called to draw the background. Default implementation draws the style background drawable. | |
| drawItem | back to summary |
|---|---|
| protected GlyphLayout drawItem(Batch batch, BitmapFont font, int index, T item, float x, float y, float width) | |
| drawSelection | back to summary |
|---|---|
| protected void drawSelection(Batch batch, Drawable drawable, float x, float y, float width, float height) | |
| getAlignment | back to summary |
|---|---|
| public int getAlignment() | |
| getCullingArea | back to summary |
|---|---|
public Rectangle getCullingArea()
| |
| getItemAt | back to summary |
|---|---|
public T getItemAt(float y)
| |
| getItemHeight | back to summary |
|---|---|
| public float getItemHeight() | |
| getItemIndexAt | back to summary |
|---|---|
public int getItemIndexAt(float y)
| |
| getItems | back to summary |
|---|---|
| public Array Returns the internal items array. If modified, | |
| getKeyListener | back to summary |
|---|---|
| public InputListener getKeyListener() | |
| getOverItem | back to summary |
|---|---|
public T getOverItem()
| |
| getPrefHeight | back to summary |
|---|---|
| public float getPrefHeight() Overrides com. Implements com. | |
| getPrefWidth | back to summary |
|---|---|
| public float getPrefWidth() Overrides com. Implements com. | |
| getPressedItem | back to summary |
|---|---|
public T getPressedItem()
| |
| getSelected | back to summary |
|---|---|
| public T getSelected() Returns the first selected item, or null.
| |
| getSelectedIndex | back to summary |
|---|---|
public int getSelectedIndex()
| |
| getSelection | back to summary |
|---|---|
| public ArraySelection | |
| getStyle | back to summary |
|---|---|
| public List. Implements com. Returns the list's style. Modifying the returned style may not have an effect until | |
| layout | back to summary |
|---|---|
| public void layout() Overrides com. Implements com. Doc from com. Computes and caches any information needed for drawing and, if this actor has children, positions and sizes each child,
calls | |
| setAlignment | back to summary |
|---|---|
| public void setAlignment(int alignment) Sets the horizontal alignment of the list items.
| |
| setCullingArea | back to summary |
|---|---|
| public void setCullingArea(Rectangle cullingArea) Implements com. | |
| setItems | back to summary |
|---|---|
| public void setItems(T... newItems) | |
| setItems | back to summary |
|---|---|
| public void setItems(Array<T> newItems) Sets the items visible in the list, clearing the selection if it is no longer valid. If a selection is
| |
| setSelected | back to summary |
|---|---|
| public void setSelected(T item) Sets the selection to only the passed item, if it is a possible choice.
| |
| setSelectedIndex | back to summary |
|---|---|
| public void setSelectedIndex(int index) Sets the selection to only the selected index.
| |
| setSelection | back to summary |
|---|---|
| public void setSelection(ArraySelection<T> selection) | |
| setStyle | back to summary |
|---|---|
| public void setStyle(List. Implements com. Doc from com. Set the current style of the actor | |
| setTypeToSelect | back to summary |
|---|---|
| public void setTypeToSelect(boolean typeToSelect) | |
| toString | back to summary |
|---|---|
| public String toString(T object) | |
List.
| Modifier and Type | Field and Description |
|---|---|
| public Drawable | |
| public Drawable | |
| public BitmapFont | |
| public Color | |
| public Color | |
| public Drawable | |
| public Drawable |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| background | back to summary |
|---|---|
| public Drawable background
| |
| down | back to summary |
|---|---|
| public Drawable down
| |
| font | back to summary |
|---|---|
| public BitmapFont font | |
| fontColorSelected | back to summary |
|---|---|
| public Color fontColorSelected | |
| fontColorUnselected | back to summary |
|---|---|
| public Color fontColorUnselected | |
| over | back to summary |
|---|---|
| public Drawable over
| |
| selection | back to summary |
|---|---|
| public Drawable selection | |
| ListStyle | back to summary |
|---|---|
| public ListStyle() | |
| ListStyle | back to summary |
|---|---|
| public ListStyle(BitmapFont font, Color fontColorSelected, Color fontColorUnselected, Drawable selection) | |
| ListStyle | back to summary |
|---|---|
| public ListStyle(List. | |