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

# Interface ComponentSelectorHandle

All Superinterfaces:
  `FormComponentHandle`

public interface ComponentSelectorHandle extends FormComponentHandle
Handle for the "Installation components selector" form component. The Swing widget is a `JTree`.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ComponentSelectorHandle`
  `assertDisabled()`
  `ComponentSelectorHandle`
  `assertEnabled()`
  `ComponentSelectorHandle`
  `assertInvisible()`
  `ComponentSelectorHandle`
  `assertVisible()`
  `List<String>`
  `getSelectedComponentIds()`
  The ids of the components currently marked for installation.
  `boolean`
  `isChangeable(String componentId)`
  Whether the user can toggle the component's selection state.
  `boolean`
  `isComponentVisible(String componentId)`
  Whether the component with the given id is visible in the tree, that is, not hidden via `InstallationComponentSetup.isHidden()`.
  `boolean`
  `isSelected(String componentId)`
  Whether the component with the given id is currently selected for installation.
  `ComponentSelectorHandle`
  `selectOnly(String... componentIds)`
  Set only the listed components selected.
  `ComponentSelectorHandle`
  `setSelected(String componentId, boolean selected)`
  Toggle a component's selection state.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getSelectedComponentIds

    @NotNull List<String> getSelectedComponentIds()
    The ids of the components currently marked for installation.

  - ### isSelected

    boolean isSelected(@NotNull String componentId)
    Whether the component with the given id is currently selected for installation.

  - ### isComponentVisible

    boolean isComponentVisible(@NotNull String componentId)
    Whether the component with the given id is visible in the tree, that is, not hidden via `InstallationComponentSetup.isHidden()`.

  - ### isChangeable

    boolean isChangeable(@NotNull String componentId)
    Whether the user can toggle the component's selection state. Components configured as mandatory are not user-toggleable.

  - ### setSelected

    @NotNull ComponentSelectorHandle setSelected(@NotNull String componentId, boolean selected)
    Toggle a component's selection state.

  - ### selectOnly

    @NotNull ComponentSelectorHandle selectOnly(@NotNull String... componentIds)
    Set only the listed components selected. Every other changeable component is deselected. Mandatory components are left at their configured value.

  - ### assertEnabled

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

  - ### assertDisabled

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

  - ### assertVisible

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

  - ### assertInvisible

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