com.holonplatform.vaadin.flow.components.builders

## Interface FlexComponentConfigurator<C extends FlexComponentConfigurator<C>>

- Type Parameters:
    `C` - Concrete configurator type
  All Superinterfaces:
    HasComponentsConfigurator<C>, HasElementConfigurator<C>, HasEnabledConfigurator<C>, HasSizeConfigurator<C>, HasStyleConfigurator<C>
  All Known Subinterfaces:
    HorizontalLayoutBuilder, ThemableFlexComponentConfigurator<C>, ThemableFlexComponentConfigurator.HorizontalLayoutConfigurator, ThemableFlexComponentConfigurator.VerticalLayoutConfigurator, VerticalLayoutBuilder

      public interface FlexComponentConfigurator<C extends FlexComponentConfigurator<C>>
      extends HasComponentsConfigurator<C>, HasStyleConfigurator<C>, HasSizeConfigurator<C>

  Configurator for `FlexComponent` type components.
  Since:
    5.2.0

- - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.vaadin.flow.components.builders.HasSizeConfigurator

      `FULL_SIZE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default C` | `addAndAlign(com.vaadin.flow.component.Component component, com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment)` Adds a component to the layout using given `alignment`.
    `default C` | `align(com.vaadin.flow.component.Component component, com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment)` Set the alignment for an individual component inside the layout.
    `C` | `alignItems(com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment)` Sets the default alignment to be used by all components without individual alignments inside the layout.
    `C` | `alignSelf(com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment, com.vaadin.flow.component.HasElement... elementContainers)` Sets an alignment for individual element container inside the layout.
    `C` | `expand(com.vaadin.flow.component.Component... componentsToExpand)` Expands the given components.
    `C` | `flexGrow(double flexGrow, com.vaadin.flow.component.HasElement... elementContainers)` Sets the flex grow property of the components inside the layout.
    `C` | `justifyContentMode(com.vaadin.flow.component.orderedlayout.FlexComponent.JustifyContentMode justifyContentMode)` Gets the `FlexComponent.JustifyContentMode` used by this layout.

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasComponentsConfigurator

      `add, add`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasElementConfigurator

      `withEventListener, withEventListener, withThemeName`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasEnabledConfigurator

      `disabled, enabled`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasStyleConfigurator

      `styleName, styleNames`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasSizeConfigurator

      `fullHeight, fullSize, fullWidth, height, height, heightUndefined, sizeUndefined, width, width, widthUndefined`

- - ### Method Detail

    - #### alignItems

          C alignItems(com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment)

      Sets the default alignment to be used by all components without individual alignments inside the layout.

      The default alignment is `FlexComponent.Alignment.STRETCH`.

      Parameters:
        `alignment` - the alignment to apply to the components. Setting `null` will reset the alignment to its default
      Returns:
        this

    - #### alignSelf

          C alignSelf(com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment,
                      com.vaadin.flow.component.HasElement... elementContainers)

      Sets an alignment for individual element container inside the layout. This individual alignment for the element container overrides any alignment set using `alignItems`.

      The default alignment for individual components is `FlexComponent.Alignment.AUTO`.

      Parameters:
        `alignment` - the individual alignment for the children components. Setting `null` will reset the alignment to its default
        `elementContainers` - The element containers (components) to which the individual alignment should be set
      Returns:
        this

    - #### align

          default C align(com.vaadin.flow.component.Component component,
                          com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment)

      Set the alignment for an individual component inside the layout.
      Parameters:
        `component` - the component to set the alignment for
        `alignment` - the Alignment to set
      Returns:
        this

    - #### flexGrow

          C flexGrow(double flexGrow,
                     com.vaadin.flow.component.HasElement... elementContainers)

      Sets the flex grow property of the components inside the layout. The flex grow property specifies what amount of the available space inside the layout the component should take up, proportionally to the other components.

      For example, if all components have a flex grow property value set to 1, the remaining space in the layout will be distributed equally to all components inside the layout. If you set a flex grow property of one component to 2, that component will take twice the available space as the other components, and so on.

      Setting to flex grow property value 0 disables the expansion of the element container. Negative values are not allowed.

      Parameters:
        `flexGrow` - the proportion of the available space the element container should take up
        `elementContainers` - the containers (components) to apply the flex grow property
      Returns:
        this

    - #### justifyContentMode

          C justifyContentMode(com.vaadin.flow.component.orderedlayout.FlexComponent.JustifyContentMode justifyContentMode)

      Gets the `FlexComponent.JustifyContentMode` used by this layout.

      The default justify content mode is `FlexComponent.JustifyContentMode.START`.

      Parameters:
        `justifyContentMode` - the justify content mode of the layout, never `null`
      Returns:
        this

    - #### expand

          C expand(com.vaadin.flow.component.Component... componentsToExpand)

      Expands the given components.

      It effectively sets `1` as a flex grow property value for each component.

      Parameters:
        `componentsToExpand` - components to expand
      Returns:
        this

    - #### addAndAlign

          default C addAndAlign(com.vaadin.flow.component.Component component,
                                com.vaadin.flow.component.orderedlayout.FlexComponent.Alignment alignment)

      Adds a component to the layout using given `alignment`.
      Parameters:
        `component` - The component to add
        `alignment` - the Alignment to use for the component
      Returns:
        this

Copyright © 2019 The Holon Platform. All rights reserved.