com.holonplatform.vaadin.components

## Interface Input<V>

- Type Parameters:
    `V` - Value type
  All Superinterfaces:
    Serializable, ValueComponent<V>, ValueHolder<V>
  All Known Subinterfaces:
    MultiSelect<T>, SingleSelect<T>, ValidatableInput<V>

      public interface Input<V>
      extends ValueHolder<V>, ValueComponent<V>

  Input component representation, i.e. a UI component that has a user-editable value.

  Extends `ValueHolder` since handles a value, supporting `ValueChangeListener`s registration.

  The actual UI `Component` which represents the input component can be obtained through `ValueComponent.getComponent()`.

  Since:
    5.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `Input.InputFieldPropertyRenderer<T,F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component>` A convenience interface to render a `Property` as a `Input` using a `HasValue` component.
    `static interface` | `Input.InputPropertyRenderer<T>` A convenience interface with a fixed `Input` rendering type to use a `Input` `PropertyRenderer` as a functional interface.

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.components.ValueHolder

      `ValueHolder.ValueChangeEvent<V>, ValueHolder.ValueChangeListener<V>`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `focus()` Sets the focus for this input component, if supported by concrete component implementation.
    `static <F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component,T> Input<T>` | `from(F field)` Create a `Input` component type from given `HasValue` component.
    `boolean` | `isReadOnly()` Returns whether this input component is in read-only mode or not.
    `boolean` | `isRequired()` Gets whether the field is required, i.e. a required indicator symbol is visible.
    `void` | `setReadOnly(boolean readOnly)` Sets the read-only mode of this input component.
    `void` | `setRequired(boolean required)` Sets whether the required indicator symbol is visible.

    - ### Methods inherited from interface com.holonplatform.vaadin.components.ValueHolder

      `addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValue`

    - ### Methods inherited from interface com.holonplatform.vaadin.components.ValueComponent

      `getComponent, getValue`

- - ### Method Detail

    - #### setReadOnly

          void setReadOnly(boolean readOnly)

      Sets the read-only mode of this input component. The user can't change the value when in read-only mode.
      Parameters:
        `readOnly` - the read-only mode of this input component

    - #### isReadOnly

          boolean isReadOnly()

      Returns whether this input component is in read-only mode or not.
      Returns:
        `false` if the user can modify the value, `true` if not

    - #### isRequired

          boolean isRequired()

      Gets whether the field is required, i.e. a required indicator symbol is visible.
      Returns:
        `true` if the field as required, `false` otherwise

    - #### setRequired

          void setRequired(boolean required)

      Sets whether the required indicator symbol is visible.
      Parameters:
        `required` - `true` to set the field as required, `false` otherwise

    - #### focus

          void focus()

      Sets the focus for this input component, if supported by concrete component implementation.

    - #### from

          static <F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component,T> Input<T> from(F field)

      Create a `Input` component type from given `HasValue` component.
      Type Parameters:
        `T` - Value type
        `F` - `HasValue` component type
      Parameters:
        `field` - The field instance (not null)
      Returns:
        A new `Input` component which wraps the given `field`

Copyright © 2017 The Holon Platform. All rights reserved.