public class PasswordField extends TextField
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
Sizeable.Unit
HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<V>
DESIGN_ATTR_PLAIN_TEXT
SIZE_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, setValueChangeTimeout
addValueChangeListener, createValueChange, focus, getTabIndex, isDifferentValue, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setTabIndex, setValue
addContextClickListener, 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, setWidthUndefined
addAttachListener, 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, updateDiffstate
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addListener, 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, setVisible
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getConnectorId
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
clear, getDefaultValidator, getOptionalValue, isEmpty
public PasswordField()
public PasswordField(String caption, String value)
caption
- the caption for the fieldvalue
- the value for the field, not null
public 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 null
public 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 null
public 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 null
valueChangeListener
- the value change listener, not null
public void readDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Component
The 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 Component
readDesign
in class TextField
design
- The element to obtain the state fromdesignContext
- The DesignContext instance used for parsing the designpublic void writeDesign(org.jsoup.nodes.Element design, DesignContext designContext)
Component
The 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 Component
writeDesign
in class TextField
design
- 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()
AbstractComponent
protected PasswordFieldState getState(boolean markAsDirty)
AbstractClientConnector
getState
in class TextField
markAsDirty
- true if the connector should automatically be marked dirty,
false otherwiseAbstractClientConnector.getState()
Copyright © 2021 Vaadin Ltd. All rights reserved.