FormContainer

public class FormContainer

A Form Container contains the list of DatatypeWidget widgets included in a Form along with the visual layout containing them.

Fields

index

int index

The index.

layout

ViewGroup layout

The layout.

widgets

List<DatatypeWidget<EhrDatatype>> widgets

The widgets.

Constructors

FormContainer

public FormContainer(ViewGroup layout, List<DatatypeWidget<EhrDatatype>> widgets, int index)

Creates a new Form Container

Parameters:
  • layout – the layout the layout containing all the DatatypeWidget
  • widgets – the list of the DatatypeWidget
  • index – the index of this form

Methods

getIndex

public int getIndex()

Get the index of this form container

Returns:the index

getLayout

public ViewGroup getLayout()

Gets the layout of this form

Returns:the layout

getWidgets

public List<DatatypeWidget<EhrDatatype>> getWidgets()

Get the widgets of this form container.

Returns:the widgets

resetAllWidgets

public void resetAllWidgets()

Reset the content of all widgets of this form according to the current value of their underlying data types.

resetWidget

public void resetWidget(int index)

Reset the content of the selected widget according to the current value of the underlying data type.

Parameters:
  • index – the index

submitAllWidgets

public void submitAllWidgets()

Submit all widgets.

Throws:

submitWidget

public void submitWidget(int index)

Update the value of the underlying data type according to the current content of the widget.

Parameters:
  • index – the widget index
Throws: