public static class DefaultNavigationLink.DefaultBuilder extends AbstractNavigationURLBuilder<NavigationLink.Builder> implements NavigationLink.Builder
Builder implementation.ComponentConfigurator.BaseComponentConfiguratorHasTextConfigurator.BaseHasTextConfiguratorHasStyleConfigurator.BaseHasStyleConfiguratorHasSizeConfigurator.BaseHasSizeConfiguratorHasEnabledConfigurator.BaseHasEnabledConfiguratorFULL_SIZE| Constructor and Description |
|---|
DefaultBuilder(Class<? extends com.vaadin.flow.component.Component> navigationTarget)
Constructor with navigation target.
|
DefaultBuilder(Class<? extends com.vaadin.flow.component.Component> navigationTarget,
com.vaadin.flow.router.Router router)
Constructor with navigation target.
|
DefaultBuilder(String path)
Constructor with path.
|
| Modifier and Type | Method and Description |
|---|---|
NavigationLink |
build()
Build the
NavigationLink. |
NavigationLink.Builder |
elementConfiguration(Consumer<com.vaadin.flow.dom.Element> element)
Configure the component
Element. |
NavigationLink.Builder |
enabled(boolean enabled)
Set whether the component is enabled.
|
NavigationLink.Builder |
height(String height)
Sets the height of the component.
|
NavigationLink.Builder |
id(String id)
Sets the id of the root element of this component.
|
boolean |
isDeferredLocalizationEnabled()
Gets whether the localizable elements of the component (for the example the text or the title) should be
localized in deferred mode.
|
NavigationLink.Builder |
maxHeight(String maxHeight)
Set the max-height of the component.
|
NavigationLink.Builder |
maxWidth(String maxWidth)
Set the max-width of the component.
|
NavigationLink.Builder |
minHeight(String minHeight)
Set the min-height of the component.
|
NavigationLink.Builder |
minWidth(String minWidth)
Set the min-width of the component.
|
NavigationLink.Builder |
styleName(String styleName)
Adds a CSS style class names to this component.
|
NavigationLink.Builder |
styleNames(String... styleNames)
Adds one or more CSS style class names to this component.
|
NavigationLink.Builder |
text(com.holonplatform.core.i18n.Localizable text)
Sets the text content using a
Localizable message. |
NavigationLink.Builder |
visible(boolean visible)
Sets the component visibility.
|
NavigationLink.Builder |
width(String width)
Sets the width of the component.
|
NavigationLink.Builder |
withAttachListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.AttachEvent> listener)
Add an
AttachEvent ComponentEventListener to the component, called after the component is
attached to the application. |
NavigationLink.Builder |
withDeferredLocalization(boolean deferredLocalization)
Sets whether the localizable elements of the component (for the example the text or the title) should be
localized in deferred mode.
|
NavigationLink.Builder |
withDetachListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.DetachEvent> listener)
Add an
DetachEvent ComponentEventListener to the component, called before the component is
detached from the application. |
NavigationLink.Builder |
withEventListener(String eventType,
com.vaadin.flow.dom.DomEventListener listener)
Adds an event listener for the given event type.
|
NavigationLink.Builder |
withEventListener(String eventType,
com.vaadin.flow.dom.DomEventListener listener,
String filter)
Adds an event listener for the given event type and configure a filter.
|
NavigationLink.Builder |
withThemeName(String themeName)
Adds a theme name to this component.
|
encodeQueryParameters, withPathParameter, withQueryParameterequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, hiddencreate, create, text, textcreatecreate, fullHeight, fullSize, fullWidth, height, heightUndefined, sizeUndefined, width, widthUndefinedcreate, disabledencodeQueryParameters, withPathParameter, withQueryParameter, withQueryParameterdeferLocalizationpublic DefaultBuilder(Class<? extends com.vaadin.flow.component.Component> navigationTarget)
navigationTarget - The navigation target (not null).public DefaultBuilder(Class<? extends com.vaadin.flow.component.Component> navigationTarget, com.vaadin.flow.router.Router router)
navigationTarget - The navigation target (not null).router - The Router to use to resolve navigation target URLs (may be null)public DefaultBuilder(String path)
path - The navigation path.public boolean isDeferredLocalizationEnabled()
HasDeferrableLocalizationWhen the deferred localization mode is enabled, the actual messages localization is triggered when the component is displayed in UI, typically when it is attached to a parent component. Otherwise, the messages localization is performed immediately at component build/configuration time.
isDeferredLocalizationEnabled in interface HasDeferrableLocalizationpublic NavigationLink.Builder withDeferredLocalization(boolean deferredLocalization)
DeferrableLocalizationConfiguratorWhen the deferred localization mode is enabled, the actual messages localization is triggered when the component is displayed in UI, typically when it is attached to a parent component. Otherwise, the messages localization is performed immediately at component build/configuration time.
withDeferredLocalization in interface DeferrableLocalizationConfigurator<NavigationLink.Builder>deferredLocalization - Whether to enable the deferred localization modepublic NavigationLink.Builder id(String id)
ComponentConfiguratorid in interface ComponentConfigurator<NavigationLink.Builder>id - the id to set, or null to remove any previously set idpublic NavigationLink.Builder visible(boolean visible)
ComponentConfiguratorWhen a component is set as invisible, all the updates of the component from the server to the client are blocked until the component is set as visible again.
Invisible components don't receive any updates from the client-side.
visible in interface ComponentConfigurator<NavigationLink.Builder>visible - Whether the component is visiblepublic NavigationLink.Builder elementConfiguration(Consumer<com.vaadin.flow.dom.Element> element)
ComponentConfiguratorElement.elementConfiguration in interface ComponentConfigurator<NavigationLink.Builder>element - The consumer to use to configure the component Element (not null)public NavigationLink.Builder withAttachListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.AttachEvent> listener)
ComponentConfiguratorAttachEvent ComponentEventListener to the component, called after the component is
attached to the application.withAttachListener in interface ComponentConfigurator<NavigationLink.Builder>listener - Listener to addpublic NavigationLink.Builder withDetachListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.DetachEvent> listener)
ComponentConfiguratorDetachEvent ComponentEventListener to the component, called before the component is
detached from the application.withDetachListener in interface ComponentConfigurator<NavigationLink.Builder>listener - Listener to addpublic NavigationLink.Builder withThemeName(String themeName)
HasElementConfiguratorwithThemeName in interface HasElementConfigurator<NavigationLink.Builder>themeName - the theme name to add, not nullpublic NavigationLink.Builder withEventListener(String eventType, com.vaadin.flow.dom.DomEventListener listener)
HasElementConfiguratorEvent listeners are triggered in the order they are registered.
withEventListener in interface HasElementConfigurator<NavigationLink.Builder>eventType - the type of event to listen to, not nulllistener - the listener to add, not nullpublic NavigationLink.Builder withEventListener(String eventType, com.vaadin.flow.dom.DomEventListener listener, String filter)
HasElementConfigurator
A filter is JavaScript expression that is used for filtering events to this listener. When an event is fired in
the browser, the expression is evaluated and an event is sent to the server only if the expression value is
true-ish according to JavaScript type coercion rules. The expression is evaluated in a context where
element refers to this element and event refers to the fired event. An expression might
be e.g. event.button === 0 to only forward events triggered by the primary mouse button.
Event listeners are triggered in the order they are registered.
withEventListener in interface HasElementConfigurator<NavigationLink.Builder>eventType - the type of event to listen to, not nulllistener - the listener to add, not nullfilter - the JavaScript filter expressionpublic NavigationLink.Builder text(com.holonplatform.core.i18n.Localizable text)
HasTextConfiguratorLocalizable message.
The text value is interpred as plain text and the HTML markup is not supported.
A null value is interpreted as an empty text.
text in interface HasTextConfigurator<NavigationLink.Builder>text - Localizable text content message (may be null)LocalizationProviderpublic NavigationLink.Builder styleNames(String... styleNames)
HasStyleConfiguratorstyleNames in interface HasStyleConfigurator<NavigationLink.Builder>styleNames - The CSS style class names to be added to the componentpublic NavigationLink.Builder styleName(String styleName)
HasStyleConfiguratorMultiple styles can be specified as a space-separated list of style names.
styleName in interface HasStyleConfigurator<NavigationLink.Builder>styleName - The CSS style class name to be added to the componentpublic NavigationLink.Builder enabled(boolean enabled)
HasEnabledConfiguratorenabled in interface HasEnabledConfigurator<NavigationLink.Builder>enabled - if false then explicitly disables the object, if true then enables the
object so that its state depends on parentpublic NavigationLink.Builder width(String width)
HasSizeConfiguratorThe width should be in a format understood by the browser, e.g. "100px" or "2.5em".
If the provided width value is null then width is removed.
width in interface HasSizeConfigurator<NavigationLink.Builder>width - the width to set, may be nullpublic NavigationLink.Builder height(String height)
HasSizeConfiguratorThe height should be in a format understood by the browser, e.g. "100px" or "2.5em".
If the provided height value is null then height is removed.
height in interface HasSizeConfigurator<NavigationLink.Builder>height - the height to set, may be nullpublic NavigationLink.Builder minWidth(String minWidth)
HasSizeConfiguratorThe width should be in a format understood by the browser, e.g. "100px" or "2.5em".
minWidth in interface HasSizeConfigurator<NavigationLink.Builder>minWidth - the min width to set, may be nullpublic NavigationLink.Builder maxWidth(String maxWidth)
HasSizeConfiguratorThe width should be in a format understood by the browser, e.g. "100px" or "2.5em".
maxWidth in interface HasSizeConfigurator<NavigationLink.Builder>maxWidth - the max width to set, may be nullpublic NavigationLink.Builder minHeight(String minHeight)
HasSizeConfiguratorThe height should be in a format understood by the browser, e.g. "100px" or "2.5em".
minHeight in interface HasSizeConfigurator<NavigationLink.Builder>minHeight - the min height to set, may be nullpublic NavigationLink.Builder maxHeight(String maxHeight)
HasSizeConfiguratorThe height should be in a format understood by the browser, e.g. "100px" or "2.5em".
maxHeight in interface HasSizeConfigurator<NavigationLink.Builder>maxHeight - the max height to set, may be nullpublic NavigationLink build()
NavigationLink.BuilderNavigationLink.build in interface NavigationLink.BuilderNavigationLink instanceCopyright © 2020 The Holon Platform. All rights reserved.