org.eclipse.eef.core.api.controllers

## Class AbstractEEFWidgetController

- java.lang.Object
- - org.eclipse.eef.core.api.controllers.AbstractEEFController
  - - org.eclipse.eef.core.api.controllers.AbstractEEFWidgetController

All Implemented Interfaces:
  IEEFController, IEEFWidgetController

Direct Known Subclasses:
  AbstractEEFCustomWidgetController, EEFButtonController, EEFCheckboxController, EEFHyperlinkController, EEFLabelController, EEFListController, EEFRadioController, EEFSelectController, EEFTextController

    public abstract class AbstractEEFWidgetController
    extends AbstractEEFController
    implements IEEFWidgetController

This class is used to provide utilities to widget controller.

### Field Summary

Fields
`protected IConsumer<java.lang.String>` `newHelpConsumer` The consumer of the new value of the help.
`protected IConsumer<java.lang.String>` `newLabelConsumer` The consumer of a new value of the label.

### Fields inherited from class org.eclipse.eef.core.api.controllers.AbstractEEFController

`interpreter, variableManager`

### Constructor Summary

Constructors
Constructor and Description
`AbstractEEFWidgetController(org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager, org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter)` The constructor.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `computeHelp()` Compute the help message.
`protected abstract EEFWidgetDescription` `getDescription()` Returns the widget description.
`protected org.eclipse.emf.ecore.EObject` `getValidationRulesContainer()` Returns the EObject containing the validation rules.
`protected org.eclipse.emf.ecore.EReference` `getValidationRulesReference()` Returns the EReference containing the validation rules.
`void` `onNewHelp(IConsumer<java.lang.String> consumer)` Registers a consumer which will be called with the new value of the help.
`void` `onNewLabel(IConsumer<java.lang.String> consumer)` Register a consumer which will be called with the new value of the label when it will change.
`void` `refresh()` Refresh the controller.
`void` `removeNewHelpConsumer()` Removes the consumer of the new value of the help.
`void` `removeNewLabelConsumer()` Remove the consumer of the new value of the label.

### Methods inherited from class org.eclipse.eef.core.api.controllers.AbstractEEFController

`newEval, onValidation, removeValidationConsumer`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.eclipse.eef.core.api.controllers.IEEFController

`onValidation, removeValidationConsumer`

### Field Detail

#### newLabelConsumer

    protected IConsumer<java.lang.String> newLabelConsumer

The consumer of a new value of the label.

#### newHelpConsumer

    protected IConsumer<java.lang.String> newHelpConsumer

The consumer of the new value of the help.

### Constructor Detail

#### AbstractEEFWidgetController

    public AbstractEEFWidgetController(org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager,
                                       org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter)

The constructor.

Parameters:
  `variableManager` - The variable manager
  `interpreter` - The interpreter

### Method Detail

#### getDescription

    protected abstract EEFWidgetDescription getDescription()

Returns the widget description.

Returns:
  The widget description

#### getValidationRulesContainer

    protected org.eclipse.emf.ecore.EObject getValidationRulesContainer()

Returns the EObject containing the validation rules.

Specified by:
  `getValidationRulesContainer` in class `AbstractEEFController`
Returns:
  The EObject containing the validation rules
See Also:
  `AbstractEEFController.getValidationRulesContainer()`

#### getValidationRulesReference

    protected org.eclipse.emf.ecore.EReference getValidationRulesReference()

Returns the EReference containing the validation rules.

Specified by:
  `getValidationRulesReference` in class `AbstractEEFController`
Returns:
  The EReference containing the validation rules.
See Also:
  `AbstractEEFController.getValidationRulesReference()`

#### onNewLabel

    public void onNewLabel(IConsumer<java.lang.String> consumer)

Register a consumer which will be called with the new value of the label when it will change.

Specified by:
  `onNewLabel` in interface `IEEFWidgetController`
Parameters:
  `consumer` - The consumer of the new value of the label
See Also:
  `IEEFWidgetController.onNewLabel(org.eclipse.eef.core.api.controllers.IConsumer)`

#### removeNewLabelConsumer

    public void removeNewLabelConsumer()

Remove the consumer of the new value of the label.

Specified by:
  `removeNewLabelConsumer` in interface `IEEFWidgetController`
See Also:
  `IEEFWidgetController.removeNewLabelConsumer()`

#### onNewHelp

    public void onNewHelp(IConsumer<java.lang.String> consumer)

Registers a consumer which will be called with the new value of the help.

Specified by:
  `onNewHelp` in interface `IEEFWidgetController`
Parameters:
  `consumer` - The consumer of the new value of the help
See Also:
  `IEEFWidgetController.onNewHelp(org.eclipse.eef.core.api.controllers.IConsumer)`

#### removeNewHelpConsumer

    public void removeNewHelpConsumer()

Removes the consumer of the new value of the help.

Specified by:
  `removeNewHelpConsumer` in interface `IEEFWidgetController`
See Also:
  `IEEFWidgetController.removeNewHelpConsumer()`

#### refresh

    public void refresh()

Refresh the controller.

Specified by:
  `refresh` in interface `IEEFController`
Overrides:
  `refresh` in class `AbstractEEFController`
See Also:
  `AbstractEEFController.refresh()`

#### computeHelp

    public void computeHelp()

Compute the help message.

Specified by:
  `computeHelp` in interface `IEEFWidgetController`
See Also:
  `IEEFWidgetController.computeHelp()`