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

# Interface FileEditorHandle

All Superinterfaces:
  `FormComponentHandle`

public interface FileEditorHandle extends FormComponentHandle
Handle for the "Text file editor" form component. The Swing widget is a `JTextArea` that pre-loads its content from a file at screen activation and writes the edited content back when the form is completed.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FileEditorHandle`
  `assertDisabled()`
  `FileEditorHandle`
  `assertEnabled()`
  `FileEditorHandle`
  `assertInvisible()`
  `FileEditorHandle`
  `assertText(String expected)`
  Assert that the editor's current text equals the expected value.
  `FileEditorHandle`
  `assertVisible()`
  `FileEditorHandle`
  `clear()`
  Clear the editor.
  `File`
  `getFile()`
  The file the editor reads from and writes back to, with variables substituted.
  `String`
  `getText()`
  The current text shown in the editor.
  `FileEditorHandle`
  `setText(String text)`
  Replace the editor's text.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getFile

    @NotNull File getFile()
    The file the editor reads from and writes back to, with variables substituted.

  - ### getText

    @NotNull String getText()
    The current text shown in the editor.

  - ### setText

    @NotNull FileEditorHandle setText(@NotNull String text)
    Replace the editor's text. The new content is only persisted to the underlying file when the form is completed, that is, when `ScreenHandle.nextScreen()` is invoked successfully.

  - ### clear

    @NotNull FileEditorHandle clear()
    Clear the editor.

  - ### assertText

    @NotNull FileEditorHandle assertText(@NotNull String expected)
    Assert that the editor's current text equals the expected value.

  - ### assertEnabled

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

  - ### assertDisabled

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

  - ### assertVisible

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

  - ### assertInvisible

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