# ListSpinnerHandle

Import: `import com.install4j.api.test.formcomponents.ListSpinnerHandle;`

```java
interface ListSpinnerHandle extends FormComponentHandle
```

Handle for the "Spinner of enumerated values" form component. The Swing widget is a
`JSpinner` that cycles through a fixed list of string entries.

Reach this handle via [`ScreenHandle.listSpinner`](../ui/ScreenHandle.md#listspinner).

## Inherited from

- [FormComponentHandle](FormComponentHandle.md) — 7 methods

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getItems()`](#getitems) | `List<String>` | The configured list entries. |
| [`getSelectedItem()`](#getselecteditem) | `String` | The currently displayed entry. |
| [`getSelectedIndex()`](#getselectedindex) | `int` | The index of the currently displayed entry. |
| [`selectItem(String)`](#selectitem-string) | `ListSpinnerHandle` | Select the entry whose label equals the given value. |
| [`selectIndex(int)`](#selectindex-int) | `ListSpinnerHandle` | Select the entry at the given index. |
| [`increment()`](#increment) | `ListSpinnerHandle` | Move to the next entry. |
| [`decrement()`](#decrement) | `ListSpinnerHandle` | Move to the previous entry. |
| [`assertSelectedItem(String)`](#assertselecteditem-string) | `ListSpinnerHandle` | Assert that the currently displayed entry equals the expected value. |
| [`assertEnabled()`](#assertenabled) | `ListSpinnerHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `ListSpinnerHandle` |  |
| [`assertVisible()`](#assertvisible) | `ListSpinnerHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `ListSpinnerHandle` |  |

### getItems()

```java
List<String> getItems()
```

The configured list entries.

### getSelectedItem()

```java
String getSelectedItem()
```

The currently displayed entry.

### getSelectedIndex()

```java
int getSelectedIndex()
```

The index of the currently displayed entry.

### selectItem(String)

```java
ListSpinnerHandle selectItem(String item)
```

Select the entry whose label equals the given value.

### selectIndex(int)

```java
ListSpinnerHandle selectIndex(int index)
```

Select the entry at the given index.

### increment()

```java
ListSpinnerHandle increment()
```

Move to the next entry.

### decrement()

```java
ListSpinnerHandle decrement()
```

Move to the previous entry.

### assertSelectedItem(String)

```java
ListSpinnerHandle assertSelectedItem(String expected)
```

Assert that the currently displayed entry equals the expected value.

### assertEnabled()

```java
ListSpinnerHandle assertEnabled()
```

### assertDisabled()

```java
ListSpinnerHandle assertDisabled()
```

### assertVisible()

```java
ListSpinnerHandle assertVisible()
```

### assertInvisible()

```java
ListSpinnerHandle assertInvisible()
```

