Package com.vaadin.flow.component.login
Class LoginOverlay
- java.lang.Object
-
- com.vaadin.flow.component.Component
-
- com.vaadin.flow.component.login.AbstractLogin
-
- com.vaadin.flow.component.login.LoginOverlay
-
- All Implemented Interfaces:
AttachNotifier,DetachNotifier,HasElement,HasEnabled,HasStyle,Serializable
@Tag("vaadin-login-overlay") @NpmPackage(value="@vaadin/polymer-legacy-adapter",version="23.6.3") @NpmPackage(value="@vaadin/login",version="23.6.3") @NpmPackage(value="@vaadin/vaadin-login",version="23.6.3") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") @JsModule("@vaadin/login/src/vaadin-login-overlay.js") @JsModule("./loginOverlayConnector.js") public class LoginOverlay extends AbstractLogin implements HasStyle
Server-side component for the<vaadin-login-overlay>component. OnAbstractLogin.LoginEventcomponent becomes disabled. Disabled component stops to process login events, however theAbstractLogin.ForgotPasswordEventevent is processed anyway. To enable use theHasEnabled.setEnabled(boolean)method. Setting errorAbstractLogin.setError(boolean)true makes component automatically enabled for the next login attempt.- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.vaadin.flow.component.login.AbstractLogin
AbstractLogin.ForgotPasswordEvent, AbstractLogin.LoginEvent
-
-
Constructor Summary
Constructors Constructor Description LoginOverlay()LoginOverlay(LoginI18n i18n)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the login overlay.StringgetDescription()StylegetStyle()Gets the style instance for managing inline styles for the element of this component.ComponentgetTitle()Returns custom title component which was set viasetTitle(Component)StringgetTitleAsText()Returns the value of the title property or a text content of the title if it was set viasetTitle(Component)booleanisOpened()protected voidonAttach(AttachEvent attachEvent)Called when the component is attached to a UI.voidsetDescription(String description)Sets the application description.voidsetOpened(boolean opened)Opens or closes the login overlay.voidsetTitle(Component title)Sets the application title,nullto remove any previous title and to display title set viasetTitle(String).voidsetTitle(String title)Sets the application title.-
Methods inherited from class com.vaadin.flow.component.login.AbstractLogin
addForgotPasswordListener, addLoginListener, getAction, isError, isForgotPasswordButtonVisible, onEnabledStateChanged, setAction, setError, setForgotPasswordButtonVisible, setI18n
-
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, scrollIntoView, set, setElement, setId, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
-
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
-
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
-
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
-
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
-
-
-
Constructor Detail
-
LoginOverlay
public LoginOverlay()
-
LoginOverlay
public LoginOverlay(LoginI18n i18n)
-
-
Method Detail
-
close
public void close()
Closes the login overlay.Note: This method also removes the overlay component from the DOM after closing it, unless you have added the component manually.
-
isOpened
@Synchronize(property="opened", value="opened-changed") public boolean isOpened()
-
setOpened
public void setOpened(boolean opened)
Opens or closes the login overlay. On open component becomes enabledHasEnabled.setEnabled(boolean)Note: Overlay will be attached or detached from the DOM automatically, if it was not added manually.
- Parameters:
opened-trueto open the login overlay,falseto close it
-
setTitle
public void setTitle(String title)
Sets the application title. Detaches the component title if it was set earlier. Note: the method callssetTitle(Component), which will reset the custom title, if it was set. Custom title can be reset only when the overlay is closed. Title is a part of the I18n object. SeeAbstractLogin.setI18n(LoginI18n).- See Also:
getTitleAsText()
-
getTitleAsText
@Synchronize(property="title", value="title-changed") public String getTitleAsText()
Returns the value of the title property or a text content of the title if it was set viasetTitle(Component)- Returns:
- the string value of title
-
setTitle
public void setTitle(Component title)
Sets the application title,nullto remove any previous title and to display title set viasetTitle(String). Note: the title component has to be set when the overlay is closed.- Parameters:
title- the title component to set, ornullto remove any previously set title- See Also:
getTitle()
-
getTitle
public Component getTitle()
Returns custom title component which was set viasetTitle(Component)- Returns:
- the title component,
nullif nothing was set
-
setDescription
public void setDescription(String description)
Sets the application description. Description is a part of I18n object. SeeAbstractLogin.setI18n(LoginI18n).- Parameters:
description- the description string- See Also:
getDescription()
-
getDescription
@Synchronize(property="description", value="description-changed") public String getDescription()
- Returns:
- the value of description property
-
getStyle
public Style getStyle()
Description copied from interface:HasStyleGets the style instance for managing inline styles for the element of this component.- Specified by:
getStylein interfaceHasStyle- Returns:
- the style object for the element, not
null - Throws:
UnsupportedOperationException- LoginOverlay does not support adding styles to overlay wrapper
-
onAttach
protected void onAttach(AttachEvent attachEvent)
Description copied from class:ComponentCalled when the component is attached to a UI.The default implementation does nothing.
This method is invoked before the
AttachEventis fired for the component.
-
-