Package com.orchestranetworks.ui.form

# Interface UIFormRow

public interface UIFormRow
In the context of a form, specifies a row composed of an icon, a label and a user input area (or display area, if in read-only mode).

To obtain a simple form row with not icon or label set, invoke the method `UIComponentWriter.newFormRow()`. To obtain a default fully model-driven form row, invoke the method `UIFormWriter.newFormRow(Path)`.

Since:
  5.3.0
See Also:
  - `UIComponentWriter.startFormRow(UIFormRow)`
  - `UIFormWriter.addFormRow(UIFormRow)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `UIFormRowIcon`
  `getIcon()`
  `String`
  `getIconURL()`
  `UIFormLabelSpec`
  `getLabel()`
  `Size`
  `getLabelWidth()`
  `String`
  `getRowId()`
  `Size`
  `getWidgetWidth()`
  `boolean`
  `isIconDisplayed()`
  `boolean`
  `isLabelDisplayed()`
  `Boolean`
  `isMandatoryIndicatorDisplayed()`
  `void`
  `setIcon(UIFormRowIcon anIcon)`
  Sets a built-in icon for this form row.
  `void`
  `setIconDisplayed(boolean isDisplayed)`
  Sets whether or not the icon will be displayed in the form row.
  `void`
  `setIconURL(String anIconUrl)`
  Sets a URL of an icon of this form row.
  `void`
  `setLabel(UIFormLabelSpec aLabelSpec)`
  Sets the label of the form row.
  `void`
  `setLabelDisplayed(boolean isDisplayed)`
  Sets whether or not the label will be displayed for the form row.
  `void`
  `setLabelWidth(Size aSize)`
  Sets a fixed width for the label area of the form row.
  `void`
  `setMandatoryIndicatorDisplayed(Boolean isDisplayed)`
  Sets whether or not the mandatory indicator (usually a red star near the label) will be displayed for the form row.
  `void`
  `setRowId(String aRowId)`
  Sets the specified HTML id on the row.
  `void`
  `setWidgetWidth(Size aSize)`
  Sets a minimum width for the user input/display area of the form row.

- ## Method Details

  - ### getRowId

    String getRowId()
    Since:
      5.4.0
    See Also:
      - `setRowId(String)`

  - ### setRowId

    void setRowId(String aRowId)
    Sets the specified HTML id on the row.

    This method is useful for accessing an entire form row (both label and content) using JavaScript functions, for example, hiding and showing the `UIFormRow`.

    The id attribute must respect the W3C Recommendations (in particular, uniqueness within the page). See https://www.w3.org/TR/REC-html40/struct/global.html#adef-id for more information.

    Parameters:
      `aRowId` - the HTML id to set to this form row.
    Since:
      5.4.0

  - ### getIcon

    UIFormRowIcon getIcon()
    See Also:
      - `setIcon(UIFormRowIcon)`

  - ### setIcon

    void setIcon(UIFormRowIcon anIcon)
    Sets a built-in icon for this form row.

    It also sets the icon to displayed and clears the icon URL.

    Parameters:
      `anIcon` - the `UIFormRowIcon` to set to this form row.
    See Also:
      - `setIconURL(String)`

  - ### getIconURL

    String getIconURL()
    See Also:
      - `setIconURL(String)`

  - ### setIconURL

    void setIconURL(String anIconUrl)
    Sets a URL of an icon of this form row.

    It also sets the icon to displayed and clears the form row icon.

    Parameters:
      `anIconUrl` - the URL of the icon to set to this form row.

  - ### isIconDisplayed

    boolean isIconDisplayed()
    See Also:
      - `setIconDisplayed(boolean)`

  - ### setIconDisplayed

    void setIconDisplayed(boolean isDisplayed)
    Sets whether or not the icon will be displayed in the form row.

    If `false`, it will clear the form row icon and the icon URL.

    Default value is `true`.

    Parameters:
      `isDisplayed` - `false` to set the icon as not displayed, `true` to display the icon and set the default value.

  - ### getLabel

    UIFormLabelSpec getLabel()
    See Also:
      - `setLabel(UIFormLabelSpec)`

  - ### setLabel

    void setLabel(UIFormLabelSpec aLabelSpec)
    Sets the label of the form row.

    In the context of a `UIFormPaneWriter`, this label will override the label determined from the path.

    It also sets the label to displayed.

    Parameters:
      `aLabelSpec` - the label to set for this form row.

  - ### isLabelDisplayed

    boolean isLabelDisplayed()
    See Also:
      - `setLabelDisplayed(boolean)`

  - ### setLabelDisplayed

    void setLabelDisplayed(boolean isDisplayed)
    Sets whether or not the label will be displayed for the form row.

    If `false`, it will clear the label.

    Default value is `true`.

    Parameters:
      `isDisplayed` - `false` to set the label to not displayed, `true` to display the label and set its default value.

  - ### getLabelWidth

    Size getLabelWidth()
    See Also:
      - `setLabelWidth(Size)`

  - ### setLabelWidth

    void setLabelWidth(Size aSize)
    Sets a fixed width for the label area of the form row. The width of the label is defined as the distance between the icon and the input area. The icon, which has a fixed width, is not included.

    If the width of the label is `null`, the label will use the default width defined by the corresponding parameter in the Administration area.

    If the fixed width of the label is not `null` but the label state is set to "not displayed", the label state will be changed to displayed.

    Default value is `null`.

    Parameters:
      `aSize` - the `Size` of the label area in the form row, or `null` to reset to the default, which is automatic width.

  - ### isMandatoryIndicatorDisplayed

    Boolean isMandatoryIndicatorDisplayed()
    See Also:
      - `setMandatoryIndicatorDisplayed(Boolean)`

  - ### setMandatoryIndicatorDisplayed

    void setMandatoryIndicatorDisplayed(Boolean isDisplayed)
    Sets whether or not the mandatory indicator (usually a red star near the label) will be displayed for the form row.

    Default value is `null`.

    Parameters:
      `isDisplayed` -
      `false` to force the mandatory indicator to not be displayed,
      `true` to force the mandatory indicator to be displayed,
      `null` to let the `model driven` or the `defined label` proceed.
    Since:
      5.7.1

  - ### getWidgetWidth

    Size getWidgetWidth()
    See Also:
      - `setWidgetWidth(Size)`

  - ### setWidgetWidth

    void setWidgetWidth(Size aSize)
    Sets a minimum width for the user input/display area of the form row.
    Parameters:
      `aSize` - The `Size` of the field area of the form row. This is not a fixed width, as the contained user interface widget may increase the width.