DarkModeSwitcherHandle (install4j API)
Description: declaration: package: com.install4j.api.test.formcomponents, interface: DarkModeSwitcherHandle

# Interface DarkModeSwitcherHandle

All Superinterfaces:
  `FormComponentHandle`

public interface DarkModeSwitcherHandle extends FormComponentHandle
Handle for the "Dark mode switcher" form component. The Swing widget is a `JButton`.

Reach this handle via `ScreenHandle.darkModeSwitcher()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DarkModeSwitcherHandle`
  `assertDisabled()`
  `DarkModeSwitcherHandle`
  `assertEnabled()`
  `DarkModeSwitcherHandle`
  `assertInvisible()`
  `DarkModeSwitcherHandle`
  `assertVisible()`
  `DarkModeSwitcherHandle`
  `click()`
  Flip the UI between light and dark mode.
  `boolean`
  `isDarkMode()`
  Whether the UI is currently in dark mode.
  `boolean`
  `isDarkModeSwitchingSupported()`
  Whether the active look and feel supports dark-mode switching at all.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### click

    @NotNull DarkModeSwitcherHandle click()
    Flip the UI between light and dark mode.

  - ### isDarkMode

    boolean isDarkMode()
    Whether the UI is currently in dark mode.

  - ### isDarkModeSwitchingSupported

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

  - ### assertEnabled

    @NotNull DarkModeSwitcherHandle assertEnabled()
    Specified by:
      `assertEnabled` in interface `FormComponentHandle`

  - ### assertDisabled

    @NotNull DarkModeSwitcherHandle assertDisabled()
    Specified by:
      `assertDisabled` in interface `FormComponentHandle`

  - ### assertVisible

    @NotNull DarkModeSwitcherHandle assertVisible()
    Specified by:
      `assertVisible` in interface `FormComponentHandle`

  - ### assertInvisible

    @NotNull DarkModeSwitcherHandle assertInvisible()
    Specified by:
      `assertInvisible` in interface `FormComponentHandle`