Class WPasswordEdit
- java.lang.Object
-
public class WPasswordEdit extends WLineEdit
A password edit.A password edit is a line edit where the character are hidden.
The widget corresponds to the HTML
<input type="password">tag.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
-
Field Summary
-
Fields inherited from class eu.webtoolkit.jwt.WInteractWidget
dragTouchEndSlot_, dragTouchSlot_, noDefault
-
Fields inherited from class eu.webtoolkit.jwt.WWidget
WT_GETEXTRAMS_JS
-
-
Constructor Summary
Constructors Constructor Description WPasswordEdit()Creates a password edit with empty content.WPasswordEdit(WContainerWidget parentContainer)Creates a password edit with empty content.WPasswordEdit(java.lang.String content)Creates a password edit with given content.WPasswordEdit(java.lang.String content, WContainerWidget parentContainer)Creates a password edit with given content.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WStringgetInvalidBlankText()Returns the message displayed when the password is empty and required.WStringgetInvalidNoMatchText()Returns the message displayed when the password does not match the pattern.WStringgetInvalidTooLongText()Returns the message displayed when the password is too long.WStringgetInvalidTooShortText()Returns the message displayed when the password is too small.intgetMinLength()Returns the minimum length of text that can be entered.WStringgetPattern()Return the pattern the password must match.protected WValidatorgetRealValidator()protected java.lang.StringgetType()WValidatorgetValidator()Returns the validator.booleanisNativeControl()Returns whether a native HTML5 control is used.booleanisRequired()Return if the password is required.voidsetInvalidBlankText(java.lang.CharSequence text)Sets the message to display when the password is empty and required.voidsetInvalidNoMatchText(java.lang.CharSequence text)Sets the message to display when the password does not match the pattern.voidsetInvalidTooLongText(java.lang.CharSequence text)Sets the message to display when the password is too long.voidsetInvalidTooShortText(java.lang.CharSequence text)Sets the message to display when the password is too small.voidsetMaxLength(int length)Specifies the maximum length of text that can be entered.voidsetMinLength(int length)Specifies the minimum length of text that can be entered.voidsetNativeControl(boolean nativeControl)Changes whether a native HTML5 control is used.voidsetPattern(java.lang.String newPattern)Specifies the pattern that the password must match.voidsetRequired(boolean required)Specifies if the password is required.voidsetValidator(WValidator validator)Sets a validator for this field.ValidationStatevalidate()Validates the field.-
Methods inherited from class eu.webtoolkit.jwt.WLineEdit
boxBorder, boxPadding, getAutoCompleteToken, getCursorPosition, getDisplayText, getDomChanges, getEchoMode, getInputMask, getInputMode, getMaxLength, getSelectedText, getSelectionStart, getText, getTextSize, getValueText, hasSelectedText, isAutoComplete, render, setAutoComplete, setAutoComplete, setEchoMode, setFormData, setInputMask, setInputMask, setInputMask, setInputMask, setInputMode, setSelection, setText, setTextSize, setValueText, textInput
-
Methods inherited from class eu.webtoolkit.jwt.WFormWidget
changed, enableAjax, getLabel, getPlaceholderText, getTabIndex, hasValidatorChanged, isCanReceiveFocus, isReadOnly, propagateSetEnabled, refresh, remove, setEnabled, setHidden, setPlaceholderText, setReadOnly, setToolTip, validated, validatorChanged
-
Methods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, getMouseOverDelay, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, setDraggable, setDraggable, setDraggable, setDraggable, setMouseOverDelay, setPopup, touchEnded, touchMoved, touchStarted, unsetDraggable
-
Methods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, beingDeleted, blurred, callJavaScriptMember, childrenChanged, createDomElement, doJavaScript, escapeText, escapeText, escapeText, escapeText, find, findById, focussed, getAttributeValue, getBaseZIndex, getChildren, getClearSides, getDecorationStyle, getFloatSide, getHeight, getHtmlTagName, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getScrollVisibilityMargin, getStyleClass, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, hasFocus, hasStyleClass, hideToolTip, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isScrollVisibilityEnabled, isScrollVisible, isSetFirstFocus, isThemeStyleEnabled, isVisible, iterateChildren, jsStringLiteral, jsStringLiteral, manageWidget, parentResized, parentResized, propagateSetVisible, removeScript, removeStyleClass, resize, scrollVisibilityChanged, setAttributeValue, setBaseZIndex, setCanReceiveFocus, setClearSides, setDecorationStyle, setDeferredToolTip, setDisabled, setFlexBox, setFloatSide, setFocus, setHiddenKeepsGeometry, setHtmlTagName, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setObjectName, setOffsets, setParentWidget, setPositionScheme, setScrollVisibilityEnabled, setScrollVisibilityMargin, setSelectable, setStyleClass, setTabIndex, setThemeStyleEnabled, setVerticalAlignment, showToolTip, showToolTipOnHover, unescapeText, updateSignalConnection, voidEventSignal, widgetAdded, widgetRemoved
-
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addJSignal, addStyleClass, animateHide, animateShow, applyThemeStyles, createJavaScript, disable, dropEvent, enable, getDropTouch, getJsRef, getParent, hide, htmlText, isExposed, isGlobalWidget, isLayoutSizeAware, layoutSizeChanged, needsRerender, positionAt, positionAt, positionAt, positionAt, removeFromParent, removeStyleClass, removeWidget, render, resize, scheduleRender, scheduleRender, scheduleRender, scheduleThemeStyleApply, setClearSides, setDeferredToolTip, setFocus, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
-
Methods inherited from class eu.webtoolkit.jwt.WObject
getObjectName
-
-
-
-
Constructor Detail
-
WPasswordEdit
public WPasswordEdit(WContainerWidget parentContainer)
Creates a password edit with empty content.
-
WPasswordEdit
public WPasswordEdit()
Creates a password edit with empty content.
-
WPasswordEdit
public WPasswordEdit(java.lang.String content, WContainerWidget parentContainer)Creates a password edit with given content.
-
WPasswordEdit
public WPasswordEdit(java.lang.String content)
Creates a password edit with given content.
-
-
Method Detail
-
setMaxLength
public void setMaxLength(int length)
Description copied from class:WLineEditSpecifies the maximum length of text that can be entered.A value <= 0 indicates that there is no limit.
The default value is -1.
- Overrides:
setMaxLengthin classWLineEdit
-
setNativeControl
public void setNativeControl(boolean nativeControl)
Changes whether a native HTML5 control is used.When enabled the browser's native attribute for password input (<input type="password">) will be used instead of a validator.
This option is set to false by default. @see WPasswordEdit#isNativeControl()
-
isNativeControl
public boolean isNativeControl()
Returns whether a native HTML5 control is used.- See Also:
setNativeControl(boolean nativeControl)
-
setMinLength
public void setMinLength(int length)
Specifies the minimum length of text that can be entered.The default value is 0.
-
getMinLength
public int getMinLength()
Returns the minimum length of text that can be entered.- See Also:
setMinLength(int length)
-
setRequired
public void setRequired(boolean required)
Specifies if the password is required.If true, the password cannot be empty.
The default value is true.
-
isRequired
public boolean isRequired()
Return if the password is required.- See Also:
setRequired(boolean required)
-
setPattern
public void setPattern(java.lang.String newPattern)
Specifies the pattern that the password must match.The default value is "".
-
getPattern
public WString getPattern()
Return the pattern the password must match.- See Also:
setPattern(String newPattern)
-
setInvalidTooLongText
public void setInvalidTooLongText(java.lang.CharSequence text)
Sets the message to display when the password is too long.The default value is "Password too long".
-
getInvalidTooLongText
public WString getInvalidTooLongText()
Returns the message displayed when the password is too long.- See Also:
setInvalidTooLongText(CharSequence text)
-
setInvalidTooShortText
public void setInvalidTooShortText(java.lang.CharSequence text)
Sets the message to display when the password is too small.The default value is "Password too small".
-
getInvalidTooShortText
public WString getInvalidTooShortText()
Returns the message displayed when the password is too small.
-
setInvalidNoMatchText
public void setInvalidNoMatchText(java.lang.CharSequence text)
Sets the message to display when the password does not match the pattern.The default value is "Invalid input".
-
getInvalidNoMatchText
public WString getInvalidNoMatchText()
Returns the message displayed when the password does not match the pattern.- See Also:
setInvalidNoMatchText(CharSequence text)
-
setInvalidBlankText
public void setInvalidBlankText(java.lang.CharSequence text)
Sets the message to display when the password is empty and required.The default value is "This field cannot be empty".
-
getInvalidBlankText
public WString getInvalidBlankText()
Returns the message displayed when the password is empty and required.- See Also:
setInvalidBlankText(CharSequence text)
-
setValidator
public void setValidator(WValidator validator)
Description copied from class:WFormWidgetSets a validator for this field.The validator is used to validate the current input.
The default value is
null.- Overrides:
setValidatorin classWFormWidget- See Also:
WFormWidget.validate()
-
getValidator
public WValidator getValidator()
Description copied from class:WFormWidgetReturns the validator.- Overrides:
getValidatorin classWFormWidget
-
validate
public ValidationState validate()
Description copied from class:WFormWidgetValidates the field.- Overrides:
validatein classWLineEdit- See Also:
WFormWidget.validated()
-
getRealValidator
protected WValidator getRealValidator()
- Overrides:
getRealValidatorin classWFormWidget
-
-