All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.flow.component.textfield.GeneratedVaadinPasswordField Maven / Gradle / Ivy

There is a newer version: 24.4.12
Show newest version
/**
 * Copyright 2000-2024 Vaadin Ltd.
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  {@literal }  for the full
 * license.
 */
package com.vaadin.flow.component.textfield;

import com.vaadin.flow.component.HasStyle;
import com.vaadin.flow.component.Tag;
import com.vaadin.flow.component.dependency.JsModule;
import com.vaadin.flow.component.dependency.NpmPackage;
import com.vaadin.flow.function.SerializableBiFunction;
import com.vaadin.flow.function.SerializableFunction;

/**
 * 

* Description copied from corresponding location in WebComponent: *

*

* {@code } is a Web Component for password field control * in forms. *

*

* <vaadin-password-field label="Password"> * </vaadin-password-field> *

*

Styling

*

* See vaadin-text-field.html for the styling documentation *

*

* In addition to vaadin-text-field parts, here's the list of * vaadin-password-field specific parts *

* * * * * * * * * * * * *
Part nameDescription
{@code reveal-button}The eye icon which toggles the password visibility
*

* In addition to vaadin-text-field state attributes, here's the list of * vaadin-password-field specific attributes *

* * * * * * * * * * * * * * *
AttributeDescriptionPart name
{@code password-visible}Set when the password is visible:host
*

* See * ThemableMixin * – how to apply styles for shadow parts *

*/ @Tag("vaadin-password-field") @NpmPackage(value = "@vaadin/vaadin-text-field", version = "2.10.0") @JsModule("@vaadin/vaadin-text-field/src/vaadin-password-field.js") public abstract class GeneratedVaadinPasswordField, T> extends GeneratedVaadinTextField implements HasStyle { /** *

* Description copied from corresponding location in WebComponent: *

*

* Set to true to hide the eye icon which toggles the password visibility. *

* This property is not synchronized automatically from the client side, so * the returned value may not be the same as in client side. *

* * @return the {@code revealButtonHidden} property from the webcomponent */ protected boolean isRevealButtonHiddenBoolean() { return getElement().getProperty("revealButtonHidden", false); } /** *

* Description copied from corresponding location in WebComponent: *

*

* Set to true to hide the eye icon which toggles the password visibility. *

* * @param revealButtonHidden * the boolean value to set */ protected void setRevealButtonHidden(boolean revealButtonHidden) { getElement().setProperty("revealButtonHidden", revealButtonHidden); } /** *

* Description copied from corresponding location in WebComponent: *

*

* True if the password is visible ([type=text]). *

* This property is not synchronized automatically from the client side, so * the returned value may not be the same as in client side. *

* * @return the {@code passwordVisible} property from the webcomponent */ protected boolean isPasswordVisibleBoolean() { return getElement().getProperty("passwordVisible", false); } /** * Constructs a new GeneratedVaadinPasswordField component with the given * arguments. * * @param initialValue * the initial value to set to the value * @param defaultValue * the default value to use if the value isn't defined * @param elementPropertyType * the type of the element property * @param presentationToModel * a function that converts a string value to a model value * @param modelToPresentation * a function that converts a model value to a string value * @param

* the property type */ public

GeneratedVaadinPasswordField(T initialValue, T defaultValue, Class

elementPropertyType, SerializableFunction presentationToModel, SerializableFunction modelToPresentation) { super(initialValue, defaultValue, elementPropertyType, presentationToModel, modelToPresentation); } /** * Constructs a new GeneratedVaadinPasswordField component with the given * arguments. * * @param initialValue * the initial value to set to the value * @param defaultValue * the default value to use if the value isn't defined * @param acceptNullValues * whether null is accepted as a model value */ public GeneratedVaadinPasswordField(T initialValue, T defaultValue, boolean acceptNullValues) { super(initialValue, defaultValue, acceptNullValues); } /** * Constructs a new GeneratedVaadinPasswordField component with the given * arguments. * * @param initialValue * the initial value to set to the value * @param defaultValue * the default value to use if the value isn't defined * @param elementPropertyType * the type of the element property * @param presentationToModel * a function that accepts this component and a property value * and returns a model value * @param modelToPresentation * a function that accepts this component and a model value and * returns a property value * @param

* the property type */ public

GeneratedVaadinPasswordField(T initialValue, T defaultValue, Class

elementPropertyType, SerializableBiFunction presentationToModel, SerializableBiFunction modelToPresentation) { super(initialValue, defaultValue, elementPropertyType, presentationToModel, modelToPresentation); } /** * Default constructor. */ public GeneratedVaadinPasswordField() { this(null, null, null, (SerializableFunction) null, (SerializableFunction) null); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy