# ControlButtonContainer

Import: `import com.install4j.api.styles.ControlButtonContainer;`

```java
interface ControlButtonContainer
```

Implemented by objects that handle navigation functionality. All [`Style`](Style.md) instances implement this interface,
but a [`FormComponent`](../formcomponents/FormComponent.md) can also implement it. In that case, the interface methods are only called if the form
component is used in a style. If a form component only wants to handle a single control button type, it should
implement [`ControlButtonType`](../context/ControlButtonType.md) instead.

## Methods

| Signature | Returns | Description |
|---|---|---|
| [`setControlButtonEnabled(ControlButtonType, boolean)`](#setcontrolbuttonenabled-controlbuttontype-boolean) | `void` | Called when the enabled state of a control button is changed. |
| [`setControlButtonVisible(ControlButtonType, boolean)`](#setcontrolbuttonvisible-controlbuttontype-boolean) | `void` | Called when the visibility of a control button is changed. |
| [`setControlButtonText(ControlButtonType, String)`](#setcontrolbuttontext-controlbuttontype-string) | `void` | Called when a control button text is changed. |
| [`focusControlButton(ControlButtonType)`](#focuscontrolbutton-controlbuttontype) | `void` | Called when a control button is focused. |

### setControlButtonEnabled(ControlButtonType, boolean)

```java
void setControlButtonEnabled(ControlButtonType controlButtonType, boolean enabled)
```

Called when the enabled state of a control button is changed. This is called by the framework as required,
but it can also be triggered programatically by a call to
[`WizardContext.setControlButtonEnabled`](../context/WizardContext.md#setcontrolbuttonenabled-controlbuttontype-boolean).


**Parameters:**

- `controlButtonType` — the control button type
- `enabled` — `true` or `false`

### setControlButtonVisible(ControlButtonType, boolean)

```java
void setControlButtonVisible(ControlButtonType controlButtonType, boolean visible)
```

Called when the visibility of a control button is changed. This is called by the framework as required,
but it can also be triggered programatically by a call to
[`WizardContext.setControlButtonVisible`](../context/WizardContext.md#setcontrolbuttonvisible-controlbuttontype-boolean).


**Parameters:**

- `controlButtonType` — the control button type
- `visible` — `true` or `false`

### setControlButtonText(ControlButtonType, String)

```java
void setControlButtonText(ControlButtonType controlButtonType, String text)
```

Called when a control button text is changed. This is called for all control button types each time when
a screen is activated, but it can also be triggered programatically by a call to
[`WizardContext.setControlButtonText`](../context/WizardContext.md#setcontrolbuttontext-controlbuttontype-string).


**Parameters:**

- `controlButtonType` — the control button type
- `text` — the text for the button

### focusControlButton(ControlButtonType)

```java
void focusControlButton(ControlButtonType controlButtonType)
```

Called when a control button is focused. This is triggered programatically by a call to
[`WizardContext.focusControlButton`](../context/WizardContext.md#focuscontrolbutton-controlbuttontype).

