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

# Interface FileAssociationsHandle

All Superinterfaces:
  `FormComponentHandle`

public interface FileAssociationsHandle extends FormComponentHandle
Handle for the "File associations selector" form component. The widget is a checklist whose entries correspond to the `CreateFileAssociationAction`s reachable from this screen. The extensions in this catalog are platform-filtered, Unix actions on Linux and macOS, Windows actions on Windows, and require an `InstallFilesAction` downstream of the screen. Without those preconditions the form component renders zero checkboxes and `getExtensions()` returns the empty list.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FileAssociationsHandle`
  `assertDisabled()`
  `FileAssociationsHandle`
  `assertEnabled()`
  `FileAssociationsHandle`
  `assertInvisible()`
  `FileAssociationsHandle`
  `assertVisible()`
  `List<String>`
  `getExtensions()`
  The primary extension of every association on this form, in document order.
  `List<String>`
  `getSelectedExtensions()`
  The primary extensions of all associations currently checked.
  `boolean`
  `isSelected(String extension)`
  Whether the association whose primary extension equals the given value is currently checked.
  `FileAssociationsHandle`
  `selectAll()`
  Check every association on this form.
  `FileAssociationsHandle`
  `selectNone()`
  Uncheck every association on this form.
  `FileAssociationsHandle`
  `setSelected(String extension, boolean selected)`
  Check or uncheck the association whose primary extension equals the given value.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getExtensions

    @NotNull List<String> getExtensions()
    The primary extension of every association on this form, in document order.

  - ### isSelected

    boolean isSelected(@NotNull String extension)
    Whether the association whose primary extension equals the given value is currently checked. Throws `ComponentNotFoundException` if the form has no such association.

  - ### getSelectedExtensions

    @NotNull List<String> getSelectedExtensions()
    The primary extensions of all associations currently checked.

  - ### setSelected

    @NotNull FileAssociationsHandle setSelected(@NotNull String extension, boolean selected)
    Check or uncheck the association whose primary extension equals the given value. Throws `ComponentNotFoundException` if the form has no such association.

  - ### selectAll

    @NotNull FileAssociationsHandle selectAll()
    Check every association on this form.

  - ### selectNone

    @NotNull FileAssociationsHandle selectNone()
    Uncheck every association on this form.

  - ### assertEnabled

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

  - ### assertDisabled

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

  - ### assertVisible

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

  - ### assertInvisible

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