org.eclipse.eef.core.internal.controllers

## Class EEFTextController

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

All Implemented Interfaces:
  IEEFController, IEEFTextController, IEEFWidgetController

    public class EEFTextController
    extends AbstractEEFWidgetController
    implements IEEFTextController

This class will be used in order to manage the behavior of the text.

### Field Summary

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

`newHelpConsumer, newLabelConsumer`

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

`interpreter, variableManager`

### Constructor Summary

Constructors
Constructor and Description
`EEFTextController(EEFTextDescription description, org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager, org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter, EditingContextAdapter contextAdapter)` The constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected EEFWidgetDescription` `getDescription()` Returns the widget description.
`void` `onNewValue(IConsumer<java.lang.Object> consumer)` Register a consumer which will be called with the new value of the text when it will change.
`void` `refresh()` Refresh the controller.
`void` `removeNewValueConsumer()` Remove the consumer of the new value of the text.
`org.eclipse.core.runtime.IStatus` `updateValue(java.lang.String text)` Update the value of the text.

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

`computeHelp, getValidationRulesContainer, getValidationRulesReference, onNewHelp, onNewLabel, removeNewHelpConsumer, removeNewLabelConsumer`

### 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.IEEFWidgetController

`computeHelp, onNewHelp, onNewLabel, removeNewHelpConsumer, removeNewLabelConsumer`

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

`onValidation, removeValidationConsumer`

### Constructor Detail

#### EEFTextController

    public EEFTextController(EEFTextDescription description,
                             org.eclipse.sirius.common.interpreter.api.IVariableManager variableManager,
                             org.eclipse.sirius.common.interpreter.api.IInterpreter interpreter,
                             EditingContextAdapter contextAdapter)

The constructor.

Parameters:
  `description` - The description
  `variableManager` - The variable manager
  `interpreter` - The interpreter
  `contextAdapter` - The editing context adapter

### Method Detail

#### updateValue

    public org.eclipse.core.runtime.IStatus updateValue(java.lang.String text)

Description copied from interface: `IEEFTextController`
Update the value of the text.

Specified by:
  `updateValue` in interface `IEEFTextController`
Parameters:
  `text` - The new value of the text
Returns:
  the status of the update execution.

#### refresh

    public void refresh()

Refresh the controller.

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

#### onNewValue

    public void onNewValue(IConsumer<java.lang.Object> consumer)

Register a consumer which will be called with the new value of the text when it will change. The consumer will have the responsibility to transform the given object into text

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

#### removeNewValueConsumer

    public void removeNewValueConsumer()

Remove the consumer of the new value of the text.

Specified by:
  `removeNewValueConsumer` in interface `IEEFTextController`
See Also:
  `IEEFTextController.removeNewValueConsumer()`

#### getDescription

    protected EEFWidgetDescription getDescription()

Returns the widget description.

Specified by:
  `getDescription` in class `AbstractEEFWidgetController`
Returns:
  The widget description
See Also:
  `AbstractEEFWidgetController.getDescription()`