# LayoutGroup

Import: `import com.install4j.api.formcomponents.LayoutGroup;`

```java
interface LayoutGroup
```

Represents a layout group for form components. Instances of this interface
are contained in the list that is returned by [`FormEnvironment.getFormComponentTree`](FormEnvironment.md#getformcomponenttree).

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`getGroupType()`](#getgrouptype) | `GroupType` | Returns the type of the layout group |
| [`setEnabled(boolean)`](#setenabled-boolean) | `void` | Sets whether contained form components are enabled or not. |
| [`setVisible(boolean)`](#setvisible-boolean) | `void` | Sets whether the layout group is visible or not. |
| [`isVisible()`](#isvisible) | `boolean` | Returns whether the layout group is visible or not. |
| [`getId()`](#getid) | `String` | Get the ID that the framework associates with this layout group. |
| [`getChildren()`](#getchildren) | `List<?>` | Get the children of this layout group. |

### getGroupType()

```java
GroupType getGroupType()
```

Returns the type of the layout group


**Returns:** the type

### setEnabled(boolean)

```java
void setEnabled(boolean enabled)
```

Sets whether contained form components are enabled or not. See
[`FormComponent.setEnabled`](FormComponent.md#setenabled-boolean) for more information.
All descendant form components are affected.


**Parameters:**

- `enabled` — whether to enable the descendant form components or not

### setVisible(boolean)

```java
void setVisible(boolean visible)
```

Sets whether the layout group is visible or not.

There is no corresponding `isVisible` method, because the state of the contained
form components may be mixed.


**Parameters:**

- `visible` — whether this layout group should be visible or not

**See also:**

- [FormComponent.setVisible](FormComponent.md#setvisible-boolean)
- [LayoutGroup.isVisible](LayoutGroup.md#isvisible)

### isVisible()

```java
boolean isVisible()
```

Returns whether the layout group is visible or not.


**Returns:** `true` or `false`.

**See also:**

- [LayoutGroup.setVisible](LayoutGroup.md#setvisible-boolean)

### getId()

```java
String getId()
```

Get the ID that the framework associates with this layout group.
You can get layout groups by ID with [`FormEnvironment.getLayoutGroupById`](FormEnvironment.md#getlayoutgroupbyid-string).


**Returns:** the ID

### getChildren()

```java
List<?> getChildren()
```

Get the children of this layout group. The returned list has contents of
the same form as [`FormEnvironment.getFormComponentTree`](FormEnvironment.md#getformcomponenttree).


**Returns:** a list with the next level of form components and layout groups that
are children of this layout group

