com.holonplatform.vaadin.components

## Interface PropertyViewGroup

- All Superinterfaces:
    PropertySetBound, Serializable, ValueHolder<com.holonplatform.core.property.PropertyBox>
  All Known Subinterfaces:
    PropertyViewForm

      public interface PropertyViewGroup
      extends PropertySetBound, ValueHolder<com.holonplatform.core.property.PropertyBox>

  Provides functionalities to build and manage a group of `ViewComponent`s bound to a `Property` set.
  Since:
    5.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `PropertyViewGroup.Builder<G extends PropertyViewGroup,B extends PropertyViewGroup.Builder<G,B>>` Base `PropertyViewGroup` builder.
    `static interface` | `PropertyViewGroup.PropertyViewGroupBuilder` `PropertyViewGroup` builder.
    `static interface` | `PropertyViewGroup.ViewComponentPropertyRenderer<T>` A `PropertyRenderer` with a fixed `ViewComponent` rendering type.

    - ### 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
    --- | ---
    `static PropertyViewGroup.PropertyViewGroupBuilder` | `builder()` Get a `PropertyViewGroup.Builder` to create and setup a `PropertyViewGroup`.
    `void` | `clear()` Clears (reset the value) all the `ViewComponent`s.
    `com.holonplatform.core.property.PropertyBox` | `getValue()` Get the current property values collected into a `PropertyBox`, using the group configured properties as property set.
    `<T> Optional<ViewComponent<T>>` | `getViewComponent(com.holonplatform.core.property.Property<T> property)` Get the `ViewComponent` bound to given `property`, if any.
    `Iterable<ViewComponent>` | `getViewComponents()` Gets all the `ViewComponent`s that have been bound to a property.
    `void` | `setValue(com.holonplatform.core.property.PropertyBox propertyBox)` Set the current property values using a `PropertyBox`, loading the values to the available property bound `ViewComponent`s through the `ValueHolder.setValue(Object)` method.
    `<T> Stream<PropertyBinding<T,ViewComponent<T>>>` | `stream()` Return a `Stream` of the properties and their bound `ViewComponent`s of this view group.

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

      `getProperties, hasProperty, propertyStream`

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

      `addValueChangeListener, getEmptyValue, getOptionalValue, isEmpty`

- - ### Method Detail

    - #### getViewComponents

          Iterable<ViewComponent> getViewComponents()

      Gets all the `ViewComponent`s that have been bound to a property.
      Returns:
        An `Iterable` on all bound ViewComponents

    - #### getViewComponent

          <T> Optional<ViewComponent<T>> getViewComponent(com.holonplatform.core.property.Property<T> property)

      Get the `ViewComponent` bound to given `property`, if any.
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - Property (not null)
      Returns:
        Optional `ViewComponent` bound to given `property`

    - #### stream

          <T> Stream<PropertyBinding<T,ViewComponent<T>>> stream()

      Return a `Stream` of the properties and their bound `ViewComponent`s of this view group.
      Type Parameters:
        `T` - Property type
      Returns:
        Property-ViewComponent `PropertyBinding` stream

    - #### clear

          void clear()

      Clears (reset the value) all the `ViewComponent`s.
      Specified by:
        `clear` in interface `ValueHolder<com.holonplatform.core.property.PropertyBox>`

    - #### getValue

          com.holonplatform.core.property.PropertyBox getValue()

      Get the current property values collected into a `PropertyBox`, using the group configured properties as property set.
      Specified by:
        `getValue` in interface `ValueHolder<com.holonplatform.core.property.PropertyBox>`
      Returns:
        A `PropertyBox` containing the property values (never null)

    - #### setValue

          void setValue(com.holonplatform.core.property.PropertyBox propertyBox)

      Set the current property values using a `PropertyBox`, loading the values to the available property bound `ViewComponent`s through the `ValueHolder.setValue(Object)` method.

      Only the properties which belong to the group's property set are taken into account.

      Specified by:
        `setValue` in interface `ValueHolder<com.holonplatform.core.property.PropertyBox>`
      Parameters:
        `propertyBox` - the `PropertyBox` which contains the property values to load. If `null`, all the `ViewComponent` components are cleared.

    - #### builder

          static PropertyViewGroup.PropertyViewGroupBuilder builder()

      Get a `PropertyViewGroup.Builder` to create and setup a `PropertyViewGroup`.
      Returns:
        `PropertyViewGroup.PropertyViewGroupBuilder` builder

Copyright © 2017 The Holon Platform. All rights reserved.