# DarkModeSwitcherHandle

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

```java
interface DarkModeSwitcherHandle extends FormComponentHandle
```

Handle for the "Dark mode switcher" form component. The Swing widget is a `JButton`.

Reach this handle via [`ScreenHandle.darkModeSwitcher`](../ui/ScreenHandle.md#darkmodeswitcher).

## Inherited from

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

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`click()`](#click) | `DarkModeSwitcherHandle` | Flip the UI between light and dark mode. |
| [`isDarkMode()`](#isdarkmode) | `boolean` | Whether the UI is currently in dark mode. |
| [`isDarkModeSwitchingSupported()`](#isdarkmodeswitchingsupported) | `boolean` | Whether the active look and feel supports dark-mode switching at all. |
| [`assertEnabled()`](#assertenabled) | `DarkModeSwitcherHandle` |  |
| [`assertDisabled()`](#assertdisabled) | `DarkModeSwitcherHandle` |  |
| [`assertVisible()`](#assertvisible) | `DarkModeSwitcherHandle` |  |
| [`assertInvisible()`](#assertinvisible) | `DarkModeSwitcherHandle` |  |

### click()

```java
DarkModeSwitcherHandle click()
```

Flip the UI between light and dark mode.

### isDarkMode()

```java
boolean isDarkMode()
```

Whether the UI is currently in dark mode.

### isDarkModeSwitchingSupported()

```java
boolean isDarkModeSwitchingSupported()
```

Whether the active look and feel supports dark-mode switching at all. When this returns
`false`, the form component stays invisible.

### assertEnabled()

```java
DarkModeSwitcherHandle assertEnabled()
```

### assertDisabled()

```java
DarkModeSwitcherHandle assertDisabled()
```

### assertVisible()

```java
DarkModeSwitcherHandle assertVisible()
```

### assertInvisible()

```java
DarkModeSwitcherHandle assertInvisible()
```

