Class WPasswordEdit
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 -
Constructor Summary
ConstructorsConstructorDescriptionCreates a password edit with empty content.WPasswordEdit(WContainerWidget parentContainer) Creates a password edit with empty content.WPasswordEdit(String content) Creates a password edit with given content.WPasswordEdit(String content, WContainerWidget parentContainer) Creates a password edit with given content. -
Method Summary
Modifier and TypeMethodDescriptionReturns the message displayed when the password is empty and required.Returns the message displayed when the password does not match the pattern.Returns the message displayed when the password is too long.Returns the message displayed when the password is too small.intReturns the minimum length of text that can be entered.Return the pattern the password must match.protected WValidatorprotected StringgetType()Returns the validator.booleanReturns whether a native HTML5 control is used.booleanReturn if the password is required.voidSets the message to display when the password is empty and required.voidSets the message to display when the password does not match the pattern.voidSets the message to display when the password is too long.voidSets 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(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.validate()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, textInputMethods inherited from class eu.webtoolkit.jwt.WFormWidget
changed, enableAjax, getLabel, getPlaceholderText, getTabIndex, hasValidatorChanged, isCanReceiveFocus, isReadOnly, propagateSetEnabled, refresh, remove, setEnabled, setHidden, setPlaceholderText, setReadOnly, setToolTip, validated, validatorChangedMethods 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, unsetDraggableMethods 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, widgetRemovedMethods 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, trMethods inherited from class eu.webtoolkit.jwt.WObject
getObjectName
-
Constructor Details
-
WPasswordEdit
Creates a password edit with empty content. -
WPasswordEdit
public WPasswordEdit()Creates a password edit with empty content. -
WPasswordEdit
Creates a password edit with given content. -
WPasswordEdit
Creates a password edit with given content.
-
-
Method Details
-
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:
-
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:
-
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:
-
setPattern
Specifies the pattern that the password must match.The default value is "".
-
getPattern
Return the pattern the password must match.- See Also:
-
setInvalidTooLongText
Sets the message to display when the password is too long.The default value is "Password too long".
-
getInvalidTooLongText
Returns the message displayed when the password is too long.- See Also:
-
setInvalidTooShortText
Sets the message to display when the password is too small.The default value is "Password too small".
-
getInvalidTooShortText
Returns the message displayed when the password is too small. -
setInvalidNoMatchText
Sets the message to display when the password does not match the pattern.The default value is "Invalid input".
-
getInvalidNoMatchText
Returns the message displayed when the password does not match the pattern.- See Also:
-
setInvalidBlankText
Sets the message to display when the password is empty and required.The default value is "This field cannot be empty".
-
getInvalidBlankText
Returns the message displayed when the password is empty and required.- See Also:
-
setValidator
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:
-
getValidator
Description copied from class:WFormWidgetReturns the validator.- Overrides:
getValidatorin classWFormWidget
-
validate
Description copied from class:WFormWidgetValidates the field. -
getType
-
getRealValidator
- Overrides:
getRealValidatorin classWFormWidget
-