com.holonplatform.vaadin.components.builders

## Interface ComponentBuilder<C extends com.vaadin.ui.Component,B extends ComponentBuilder<C,B>>

- Type Parameters:
    `C` - Concrete component type
    `B` - Concrete builder type
  All Superinterfaces:
    ComponentConfigurator<B>
  All Known Subinterfaces:
    BaseLayoutBuilder<C,B>, BeanListingBuilder<T>, ButtonBuilder, ComponentContainerBuilder<C,B>, CssLayoutBuilder, Dialog.Builder<B>, Dialog.DialogBuilder, Dialog.QuestionDialogBuilder, FormLayoutBuilder, GridLayoutBuilder, HorizontalLayoutBuilder, ItemDataSourceComponentBuilder<ITEM,C,B>, ItemListingBuilder<T,P,C,B,X>, ItemListingBuilder.BaseGridItemListingBuilder<T,P,C,B>, ItemListingBuilder.GridItemListingBuilder<T,C,B>, LabelBuilder, LayoutBuilder<C,B>, OrderedLayoutBuilder<C,B>, PanelBuilder, PropertyInputForm.PropertyInputFormBuilder<C>, PropertyListingBuilder<C,B,X>, PropertyListingBuilder.BaseGridPropertyListingBuilder<C,B>, PropertyListingBuilder.GridPropertyListingBuilder, PropertyViewForm.PropertyViewFormBuilder<C>, SingleComponentContainerBuilder<C,B>, TabsBuilder<C>, VerticalLayoutBuilder, ViewComponentBuilder<T>

      public interface ComponentBuilder<C extends com.vaadin.ui.Component,B extends ComponentBuilder<C,B>>
      extends ComponentConfigurator<B>

  Base builder to create `Component`s.
  Since:
    5.0.0

- - ### Nested Class Summary

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

      `ComponentConfigurator.BaseComponentConfigurator`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `C` | `build()` Build and returns the component
    `B` | `deferLocalization()` Instructs the builder to resolve any message localization (for example component caption and description) only after the component is attached to parent layout.
    `B` | `dragSource(Consumer<com.vaadin.ui.dnd.DragSourceExtension<? extends com.vaadin.ui.AbstractComponent>> configurator)` Makes the component a drag source.
    `B` | `dropTarget(BiConsumer<com.vaadin.ui.dnd.DropTargetExtension<? extends com.vaadin.ui.AbstractComponent>,C> configurator)` Makes the component a drop target.

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

      `caption, caption, caption, captionAsHtml, description, description, description, disabled, errorHandler, fullHeight, fullSize, fullWidth, height, height, heightUndefined, hidden, icon, id, notVisible, primaryStyleName, replaceStyleName, responsive, sizeUndefined, styleName, width, width, widthUndefined, withAttachListener, withContextClickListener, withData, withDetachListener, withShortcutListener`

- - ### Method Detail

    - #### dragSource

          B dragSource(Consumer<com.vaadin.ui.dnd.DragSourceExtension<? extends com.vaadin.ui.AbstractComponent>> configurator)

      Makes the component a drag source. The provided `configurator` can be used to configure the drag source using `DragSourceExtension`, allowing for example to set the drag effect, to set the transferred data or to register drag start/end listeners.
      Parameters:
        `configurator` - Consumer to configure the drag source
      Returns:
        this
      Since:
        5.0.6

    - #### dropTarget

          B dropTarget(BiConsumer<com.vaadin.ui.dnd.DropTargetExtension<? extends com.vaadin.ui.AbstractComponent>,C> configurator)

      Makes the component a drop target. The provided `configurator` can be used to configure the drop target behaviour using `DragSourceExtension`, allowing for example to control when the drop is acceptable and then react to the drop event.
      Parameters:
        `configurator` - BiConsumer to configure the drop target, providing also the component that will be built by this builder
      Returns:
        this
      Since:
        5.0.6

    - #### deferLocalization

          B deferLocalization()

      Instructs the builder to resolve any message localization (for example component caption and description) only after the component is attached to parent layout. By default, localization is performed immediately during component building.
      Returns:
        this

    - #### build

          C build()

      Build and returns the component
      Returns:
        Component instance

Copyright © 2019 The Holon Platform. All rights reserved.