public class PasswordField extends TextField
Component.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitHasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<V>DESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
PasswordField()
Constructs an empty PasswordField.
|
PasswordField(HasValue.ValueChangeListener<String> valueChangeListener)
Constructs a new
PasswordField with a value change listener. |
PasswordField(String caption)
Constructs a PasswordField with given caption.
|
PasswordField(String caption,
HasValue.ValueChangeListener<String> valueChangeListener)
Constructs a new
PasswordField with the given caption and a value
change listener. |
PasswordField(String caption,
String value)
Constructs a PasswordField with given value and caption.
|
PasswordField(String caption,
String value,
HasValue.ValueChangeListener<String> valueChangeListener)
Constructs a new
PasswordField with the given caption, initial
text contents and a value change listener. |
| Modifier and Type | Method and Description |
|---|---|
protected PasswordFieldState |
getState()
Returns the shared state bean with information to be sent from the server
to the client.
|
protected PasswordFieldState |
getState(boolean markAsDirty)
Returns the shared state for this connector.
|
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Reads the component state from the given design.
|
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
Writes the component state to the given design.
|
addBlurListener, addFocusListener, doSetValue, getCursorPosition, getCustomAttributes, getEmptyValue, getMaxLength, getPlaceholder, getValue, getValueChangeMode, getValueChangeTimeout, selectAll, setCursorPosition, setMaxLength, setPlaceholder, setSelection, setValue, setValueChangeMode, setValueChangeTimeoutaddValueChangeListener, createValueChange, focus, getTabIndex, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setTabIndex, setValueaddContextClickListener, addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setEnabled, setHeight, setHeight, setHeightFull, setHeightUndefined, setIcon, setId, setLocale, setParent, setPrimaryStyleName, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidth, setWidthFull, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddListener, addStyleName, addStyleNames, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleName, setVisibleaddAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIdgetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefinedclear, getDefaultValidator, getOptionalValue, isEmptypublic PasswordField()
public PasswordField(String caption, String value)
caption - the caption for the fieldvalue - the value for the field, not nullpublic PasswordField(String caption)
caption - the caption for the fieldpublic PasswordField(HasValue.ValueChangeListener<String> valueChangeListener)
PasswordField with a value change listener.
The listener is called when the value of this PasswordField is
changed either by the user or programmatically.
valueChangeListener - the value change listener, not nullpublic PasswordField(String caption, HasValue.ValueChangeListener<String> valueChangeListener)
PasswordField with the given caption and a value
change listener.
The listener is called when the value of this PasswordField is
changed either by the user or programmatically.
caption - the caption for the fieldvalueChangeListener - the value change listener, not nullpublic PasswordField(String caption, String value, HasValue.ValueChangeListener<String> valueChangeListener)
PasswordField with the given caption, initial
text contents and a value change listener.
The listener is called when the value of this PasswordField is
changed either by the user or programmatically.
caption - the caption for the fieldvalue - the value for the field, not nullvalueChangeListener - the value change listener, not nullpublic void readDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
ComponentThe component is responsible not only for updating its own state but also for ensuring that its children update their state based on the design.
It is assumed that the component is in its default state when this method is called. Reading should only take into consideration attributes specified in the design and not reset any unspecified attributes to their defaults.
This method must not modify the design.
readDesign in interface ComponentreadDesign in class TextFielddesign - The element to obtain the state fromdesignContext - The DesignContext instance used for parsing the designpublic void writeDesign(org.jsoup.nodes.Element design,
DesignContext designContext)
ComponentThe component is responsible not only for writing its own state but also for ensuring that its children write their state to the design.
This method must not modify the component state.
writeDesign in interface ComponentwriteDesign in class TextFielddesign - The element to write the component state to. Any previous
attributes or child nodes are not cleared.designContext - The DesignContext instance used for writing the designprotected PasswordFieldState getState()
AbstractComponentprotected PasswordFieldState getState(boolean markAsDirty)
AbstractClientConnectorgetState in class TextFieldmarkAsDirty - true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()Copyright © 2021 Vaadin Ltd. All rights reserved.