com.github.fluorumlabs.disconnect.vaadin.PasswordField Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of disconnect-vaadin Show documentation
Show all versions of disconnect-vaadin Show documentation
Vaadin components bindings for Disconnect Zero
The newest version!
package com.github.fluorumlabs.disconnect.vaadin;
import com.github.fluorumlabs.disconnect.core.annotations.WebComponent;
import com.github.fluorumlabs.disconnect.vaadin.elements.PasswordFieldElement;
import com.github.fluorumlabs.disconnect.vaadin.mixins.HasThemableMixin;
import com.github.fluorumlabs.disconnect.zero.component.AbstractComponent;
import com.github.fluorumlabs.disconnect.zero.component.Component;
import com.github.fluorumlabs.disconnect.zero.component.HasComponents;
import com.github.fluorumlabs.disconnect.zero.component.HasStyle;
/**
* <vaadin-password-field>
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 name Description
*
*
* 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
*
*
*
* Attribute Description Part name
*
*
* password-visible
Set when the password is visible :host
*
*
* See
* ThemableMixin – how to apply styles for shadow parts
*/
@WebComponent
public class PasswordField extends AbstractComponent
implements HasThemableMixin,
HasStyle, HasComponents> {
public PasswordField() {
super(PasswordFieldElement.TAGNAME());
}
/**
* Set to true to hide the eye icon which toggles the password visibility.
*/
public boolean revealButtonHidden() {
return getNode().isRevealButtonHidden();
}
/**
* Set to true to hide the eye icon which toggles the password visibility.
*/
public PasswordField revealButtonHidden(boolean revealButtonHidden) {
getNode().setRevealButtonHidden(revealButtonHidden);
return this;
}
/**
* True if the password is visible ([type=text]).
*/
public boolean passwordVisible() {
return getNode().isPasswordVisible();
}
}