com.holonplatform.vaadin.flow.navigator

## Interface NavigationLink

- All Superinterfaces:
    HasComponent, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, Serializable

      public interface NavigationLink
      extends HasComponent, com.vaadin.flow.component.HasText, com.vaadin.flow.component.HasStyle

  A link (using the default `A` tag) that handles navigation internally, without loading a new page in the browser.

  The `HasComponent.getComponent()` method can be used to obtain the component to be added in the UI.

  Since:
    5.2.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `NavigationLink.Builder` `NavigationLink` builder.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static NavigationLink.Builder` | `builder(Class<? extends com.vaadin.flow.component.Component> navigationTarget)` Get a builder to create a `NavigationLink`.
    `static NavigationLink.Builder` | `builder(Class<? extends com.vaadin.flow.component.Component> navigationTarget, com.vaadin.flow.router.Router router)` Get a builder to create a `NavigationLink`.
    `static NavigationLink.Builder` | `builder(String path)` Get a builder to create a `NavigationLink`.
    `String` | `getHref()` Gets the href (the URL) of this link.

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

      `create, getComponent, getElement, hasEnabled, hasLabel, hasSize, hasStyle, hasValidation, isVisible, setVisible`

    - ### Methods inherited from interface com.vaadin.flow.component.HasText

      `getText, setText`

    - ### Methods inherited from interface com.vaadin.flow.component.HasStyle

      `addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName`

- - ### Method Detail

    - #### getHref

          String getHref()

      Gets the href (the URL) of this link.
      Returns:
        the href value

    - #### builder

          static NavigationLink.Builder builder(String path)

      Get a builder to create a `NavigationLink`.
      Parameters:
        `path` - The path to navigate to
      Returns:
        A new `NavigationLink` builder

    - #### builder

          static NavigationLink.Builder builder(Class<? extends com.vaadin.flow.component.Component> navigationTarget)

      Get a builder to create a `NavigationLink`.
      Parameters:
        `navigationTarget` - The navigation target to navigate to (not null)
      Returns:
        A new `NavigationLink` builder

    - #### builder

          static NavigationLink.Builder builder(Class<? extends com.vaadin.flow.component.Component> navigationTarget,
                                                com.vaadin.flow.router.Router router)

      Get a builder to create a `NavigationLink`.
      Parameters:
        `navigationTarget` - The navigation target to navigate to (not null)
        `router` - The `Router` to use to resolve navigation target URLs
      Returns:
        A new `NavigationLink` builder

Copyright © 2019 The Holon Platform. All rights reserved.