com.holonplatform.vaadin.navigator.internal

## Class DefaultViewNavigator.ViewNavigatorBuilder

- java.lang.Object
- - com.holonplatform.vaadin.navigator.internal.AbstractNavigatorBuilder<ViewNavigator.Builder,DefaultViewNavigator>
  - - com.holonplatform.vaadin.navigator.internal.DefaultViewNavigator.ViewNavigatorBuilder

- All Implemented Interfaces:
    ViewNavigator.Builder, ViewNavigator.NavigatorBuilder<ViewNavigator.Builder>
  Enclosing class:
    DefaultViewNavigator

      public static class DefaultViewNavigator.ViewNavigatorBuilder
      extends AbstractNavigatorBuilder<ViewNavigator.Builder,DefaultViewNavigator>
      implements ViewNavigator.Builder

  `Builder` implementation for fluent-style `ViewNavigator` creation

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ViewNavigatorBuilder()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ViewNavigator` | `buildAndBind(com.vaadin.ui.UI ui)` Build ViewNavigator instance and bind it to given `ui`
    `ViewNavigator.Builder` | `navigationStateManager(com.vaadin.navigator.NavigationStateManager navigationStateManager)` Set the NavigationStateManager keeping track of the active view and enabling bookmarking and direct navigation.
    `ViewNavigator.Builder` | `viewDisplay(com.vaadin.ui.ComponentContainer container)` Set the `ComponentContainer` which has to used to display `View` instances, replacing the contents of the ComponentContainer with the active view.
    `ViewNavigator.Builder` | `viewDisplay(com.vaadin.ui.SingleComponentContainer container)` Set the `SingleComponentContainer` which has to used to display `View` instances using `SingleComponentContainer.setContent(com.vaadin.ui.Component)`.
    `ViewNavigator.Builder` | `viewDisplay(com.vaadin.navigator.ViewDisplay viewDisplay)` ViewDisplay used to display `View` instances
    `ViewNavigator.Builder` | `withView(String viewName, Class<? extends com.vaadin.navigator.View> viewClass)` Add a default `ViewProvider` (if not already present) and register the given `View` class bound to given view name.

    - ### Methods inherited from class com.holonplatform.vaadin.navigator.internal.AbstractNavigatorBuilder

      `addProvider, authenticationEnabled, defaultViewName, defaultViewNavigationStrategy, defaultViewWindowConfigurator, errorView, errorViewProvider, maxNavigationHistorySize, navigateToDefaultViewWhenViewNotAvailable, viewClassProvider, withViewChangeListener`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.holonplatform.vaadin.navigator.ViewNavigator.NavigatorBuilder

      `addProvider, authenticationEnabled, defaultViewName, defaultViewNavigationStrategy, defaultViewWindowConfigurator, errorView, errorViewProvider, maxNavigationHistorySize, navigateToDefaultViewWhenViewNotAvailable, viewClassProvider, withViewChangeListener`

- - ### Constructor Detail

    - #### ViewNavigatorBuilder

          public ViewNavigatorBuilder()

  - ### Method Detail

    - #### withView

          public ViewNavigator.Builder withView(String viewName,
                                                Class<? extends com.vaadin.navigator.View> viewClass)

      Description copied from interface: `ViewNavigator.Builder`
      Add a default `ViewProvider` (if not already present) and register the given `View` class bound to given view name. This `ViewProvider` supports `StatefulView` view instances.

      View instances will be created according to view scope: for stateful views, an instance is created at first request (for each UI) and the same instance is returned to subsequent view requests. On the contrary, for standard views, a new instance is created and returned to navigator for every view request.

      Specified by:
        `withView` in interface `ViewNavigator.Builder`
      Parameters:
        `viewName` - View name (not null)
        `viewClass` - View class (not null)
      Returns:
        this

    - #### navigationStateManager

          public ViewNavigator.Builder navigationStateManager(com.vaadin.navigator.NavigationStateManager navigationStateManager)

      Description copied from interface: `ViewNavigator.Builder`
      Set the NavigationStateManager keeping track of the active view and enabling bookmarking and direct navigation.
      Specified by:
        `navigationStateManager` in interface `ViewNavigator.Builder`
      Parameters:
        `navigationStateManager` - NavigationStateManager or `null` to use the default implementation
      Returns:
        this

    - #### viewDisplay

          public ViewNavigator.Builder viewDisplay(com.vaadin.navigator.ViewDisplay viewDisplay)

      Description copied from interface: `ViewNavigator.Builder`
      ViewDisplay used to display `View` instances
      Specified by:
        `viewDisplay` in interface `ViewNavigator.Builder`
      Parameters:
        `viewDisplay` - The ViewDisplay
      Returns:
        this

    - #### viewDisplay

          public ViewNavigator.Builder viewDisplay(com.vaadin.ui.SingleComponentContainer container)

      Description copied from interface: `ViewNavigator.Builder`
      Set the `SingleComponentContainer` which has to used to display `View` instances using `SingleComponentContainer.setContent(com.vaadin.ui.Component)`.
      Specified by:
        `viewDisplay` in interface `ViewNavigator.Builder`
      Parameters:
        `container` - The `SingleComponentContainer` which has to used to display `View` instances
      Returns:
        this

    - #### viewDisplay

          public ViewNavigator.Builder viewDisplay(com.vaadin.ui.ComponentContainer container)

      Description copied from interface: `ViewNavigator.Builder`
      Set the `ComponentContainer` which has to used to display `View` instances, replacing the contents of the ComponentContainer with the active view.
      Specified by:
        `viewDisplay` in interface `ViewNavigator.Builder`
      Parameters:
        `container` - The `ComponentContainer` which has to used to display `View` instances
      Returns:
        this

    - #### buildAndBind

          public ViewNavigator buildAndBind(com.vaadin.ui.UI ui)

      Description copied from interface: `ViewNavigator.Builder`
      Build ViewNavigator instance and bind it to given `ui`
      Specified by:
        `buildAndBind` in interface `ViewNavigator.Builder`
      Parameters:
        `ui` - UI to which to bind the navigator
      Returns:
        ViewNavigator instance

Copyright © 2019 The Holon Platform. All rights reserved.