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

# Interface DateTextFieldHandle

All Superinterfaces:
  `FormComponentHandle`

public interface DateTextFieldHandle extends FormComponentHandle
Handle for the "Text field with date format" form component. The Swing widget is a `JTextField`. The handle exposes both the raw text and a `Date`-typed accessor.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DateTextFieldHandle`
  `assertDisabled()`
  `DateTextFieldHandle`
  `assertEnabled()`
  `DateTextFieldHandle`
  `assertInvisible()`
  `DateTextFieldHandle`
  `assertText(String expected)`
  Assert the current text equals the expected value.
  `DateTextFieldHandle`
  `assertVisible()`
  `DateTextFieldHandle`
  `clear()`
  Clear the field.
  `Date`
  `getDate()`
  The current value as a `Date`, or `null` if the field is empty or unparseable.
  `String`
  `getText()`
  The current text in the field.
  `DateTextFieldHandle`
  `setDate(Date date)`
  Set the field's value via the form component's formatter.
  `DateTextFieldHandle`
  `setText(String text)`
  Set the field's raw text.

  ### Methods inherited from interface FormComponentHandle

  `getId, isEnabled, isVisible`

- ## Method Details

  - ### getText

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

  - ### getDate

    @Nullable Date getDate()
    The current value as a `Date`, or `null` if the field is empty or unparseable.

  - ### setText

    @NotNull DateTextFieldHandle setText(@NotNull String text)
    Set the field's raw text.

  - ### setDate

    @NotNull DateTextFieldHandle setDate(@NotNull Date date)
    Set the field's value via the form component's formatter.

  - ### clear

    @NotNull DateTextFieldHandle clear()
    Clear the field.

  - ### assertText

    @NotNull DateTextFieldHandle assertText(@NotNull String expected)
    Assert the current text equals the expected value.

  - ### assertEnabled

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

  - ### assertDisabled

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

  - ### assertVisible

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

  - ### assertInvisible

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