Class UIText
- All Implemented Interfaces:
EventListener, IFocusComp, IMessageBox, IComponent, ICustomDataProvider, IGProp<GProp<?>[]>, IPropCnr, IUIComp, IUICompRelativeTarget, IUIContextMenuOwner, IUIFocusComp, IUIHint, IUILabelForTarget, IUIPlainTextComponent, IUITextComponent, IVSComponentListener, IVSComponentState, IVSFieldListener, Cloneable
- Direct Known Subclasses:
EUIText, UITextArea
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface IMessageBox
IMessageBox.IconNested classes/interfaces inherited from interface IVSComponentState
IVSComponentState.StateField Summary
Fields inherited from class UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsFieldFields inherited from class PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_IDFields inherited from class GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_ATTR_STRING_SECRET, PROP_USER_1, PROP_USER_2Fields inherited from interface IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EQC_SAVE_RELEVANT_ONLY, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATEFields inherited from interface IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNINGFields inherited from interface IUIComp
ERROR, INFORMATION, NONE, REMOTE_FOCUS_EVENT, WARNINGConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanGets the text align trailing option.Returns the size of the component in pixels.Gets the HTMLautocapitalizethe client sets on the input element: how a virtual keyboard capitalizes what is typed.Gets the HTMLautocompletetokens the client sets on the input element, e.g.intGets the character case option.booleanGets the character update option.final intGets the device type: -1=mobile, 0=both, 1=desktop.Gets the HTMLenterkeyhintthe client sets on the input element: the label or the icon of the Enter key of a virtual keyboard.Gets the entry field type defined.booleanGets the horizontally expand option.Gets the HTMLinputmodethe client sets on the input element: the virtual keyboard a touch device shows, whatever the field type is, e.g.intGets the maximum length of the text field.Gets entry field maximum width.Gets minimum size.booleanGets the reveal option: a field of the typeEntryFieldType.PASSWORDthen has a toggle button that shows the password typed and hides it again.Gets the label of the reveal button while the password is shown, the action it offers.Gets the label of the reveal button while the password is hidden, the action it offers.Gets the HTMLspellcheckthe client sets on the input element.booleangetTrim()Gets the trim option.Gets the visual length (unit) of the entry field.booleanReturns if the component can show the context menu in mobile mode.booleansetAlignTrailing(boolean on) Sets the text align trailing option.booleansetAutocapitalize(String capitalize) Sets the HTMLautocapitalizethe client sets on the input element: how a virtual keyboard capitalizes what is typed.booleansetAutocomplete(String tokens) Sets the HTMLautocompletetokens the client sets on the input element.booleansetCharCase(int cc) Sets the character case option.booleansetCharUpdate(boolean on) Sets the character update option.booleansetEnterKeyHint(String hint) Sets the HTMLenterkeyhintthe client sets on the input element: the label or the icon of the Enter key of a virtual keyboard.booleanSets the entry field type.booleansetHorizontallyExpand(boolean on) Sets the horizontally expand option.booleansetInputMode(String mode) Sets the HTMLinputmodethe client sets on the input element: the virtual keyboard a touch device shows.booleansetMaximalLength(int len) Sets the maximum length of the text field.booleansetMaxWidth(GUnit max) Sets the entry field maximum width.booleansetMinWidth(GUnit min) Sets the entry field minimum width.booleansetReveal(boolean on) Sets the reveal option: a field of the typeEntryFieldType.PASSWORDthen has a toggle button that shows the password typed and hides it again.booleansetRevealHideLabel(String label) Sets the label of the reveal button while the password is shown, the action it offers: its accessible name and its tooltip.booleansetRevealShowLabel(String label) Sets the label of the reveal button while the password is hidden, the action it offers: its accessible name and its tooltip.booleansetSpellcheck(Boolean check) Sets the HTMLspellcheckthe client sets on the input element.booleansetTextValue(String text) Sets the plain text property without tags processing.booleansetTrim(boolean on) Sets the trim option.booleansetVisualLength(GUnit len) Sets the visual length (unit) of the entry field.booleanverify(PropVerification verification) Verifies this text component.Methods inherited from class UIComp
add, addMappings, assignFontInfoResolver, canAcceptUIContainerFocus, canAlignX, canAlignY, canFillX, canFillY, canRequestFocus, canRequestFocus, clearErrorMessage, clone, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, doUpdateVSFieldFromUIComponent, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, getCSSClassNames, getErrorMessage, getErrorMessage, getErrorMessageEx, getErrorMessageString, getErrorMessageString, getErrorMessageStringEx, getFirstContainerVSStateFocus, getFixHeight, getFixWidth, getFontInfo, getForcedAlignX, getForcedAlignY, getKStringText, getLayout, getLayoutMgr, getLayoutMgr, getMappedVSComponent, getMessage, getMessageText, getPixelHeight, getPixelWidth, getPredefinedProps, getSize, getStyles, getStyles, getText, getTitle, getTitleKS, getTitlePKS, getTooltip, getTooltipText, getTrigger, getUIPanel, getUIParent, getValue, getValue, getVirtualSpace, getVSField, getVSStateFocus, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitAlignFillX, hasImplicitAlignFillY, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, initPropCnr, invokeOnUICreateTree, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onEventSelf, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPrepare, onPropDispose, onRemoteEvent, onResolved, onSelectionChanged, onStateChanged, onValueChanged, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, resetComponentID, setBadge, setBadge, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setUIContainerFocus, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponent, verifyComponentScopeMethods inherited from class PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializePropTree, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, isPropValueTreeLockNeeded, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualizeMethods inherited from class GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hashCode, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropErrorPersisted, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropForEditorAtCreation, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropSaveRelevant, isPropSecret, isPropSecretCapable, isPropUSER, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onInitialize, onPropInvalidateCache, onPropParentChanged, onPropValueSet, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropSecret, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toShortString, toShortString, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warningMethods inherited from interface IComponent
clearErrorMessage, getBadge, getKStringText, getLayoutMgr, getMessage, getMessageText, getStyles, getText, getTooltip, getTooltipText, getUIPanel, getUIParent, isEnabled, isReadOnly, isVisible, messageBox, requestFocus, requestFocus, requestFocusEx, requestFocusEx, setBadge, setBadge, setEnabled, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setText, setText, setTooltip, setTooltip, setVisibleMethods inherited from interface ICustomDataProvider
forbiddenGetCustomDataMap, getCustomData, putCustomData, putCustomDataIfAbsentMethods inherited from interface IFocusComp
requestFocus, requestFocus, requestFocusEx, requestFocusExMethods inherited from interface IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPropTreeInitialized, onRemoteEvent, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, warning, warning, warningMethods inherited from interface IMessageBox
messageBox, messageBox, messageBoxMethods inherited from interface IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstancesMethods inherited from interface IUIComp
canAcceptUIContainerFocus, disconnectVSField, getComponentID, getComponentMappings, getContainerFirstUIComponent, getContainerFirstUIComponentNull, getCSSClassNames, getErrorMessage, getErrorMessage, getFirstUIComponent, getFirstUIComponentNull, getFixHeight, getFixWidth, getLayout, getLayoutMgr, getPanelUIComponent, getPanelUIComponentNull, getUIRef, getValue, getValue, getVirtualSpace, getVSField, isMobile, isRTL, isVSFieldDisconnected, reconnectVSField, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setErrorMessage, setErrorMessage, setUIContainerFocus, setVSFieldMessageToComponent, setVSFieldToComponentMethods inherited from interface IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolvedMethods inherited from interface IUIFocusComp
onFocusGained, onFocusLostMethods inherited from interface IUIHint
getHintKString, getHintString, setHint, setHintMethods inherited from interface IUIPlainTextComponent
createTextPropMethods inherited from interface IVSComponentListener
onParentStateChangedMethods inherited from interface IVSFieldListener
getBestVSFieldValueType, onBroken, onResolved, onStateChanged, onValueChanged
Constructor Details
UIText
public UIText()Creates the component without a name. The name must be set in all cases using thesetPropertyAtomcall.UIText
Creates the component with the specified name. All system-reserved names for components begins with "$".- Parameters:
propertyAtom- the name of the component, unique within it's parent.
UIText
Creates the component with the specified name, initialized to contain theGPropitems. All system-reserved names for components begins with "$".- Parameters:
propertyAtom- The name of the component, unique within it's parent.newValue- The array of all properties the component should have.- Throws:
PropException- when at least one of the properties to initialize the component with is invalid.
Method Details
getDeviceType
public final int getDeviceType()Gets the device type: -1=mobile, 0=both, 1=desktop.- Specified by:
getDeviceTypein interfaceIUIComp
isMobileContextMenuSupported
public boolean isMobileContextMenuSupported()Returns if the component can show the context menu in mobile mode.- Specified by:
isMobileContextMenuSupportedin interfaceIUIContextMenuOwner- Returns:
- Text component supports context menus for mobile.
getMaximalLength
public int getMaximalLength()Gets the maximum length of the text field. The default value is zero (no limit).- Returns:
- The maximum length or 0 by default.
setMaximalLength
public boolean setMaximalLength(int len) Sets the maximum length of the text field.- Parameters:
len- The length to set.- Returns:
- Successful or not.
setTextValue
Sets the plain text property without tags processing.The text length is checked against the defined "Maximal length".
If the component is connected to a VirtualSpace Field, that text is set instead of the UI component's text.
- Parameters:
text- The text to set in plain text (no tags and no HTML tags will be processed).- Returns:
- true for change of text as is, false for no change, truncated text or not supported.
getVisualLength
Gets the visual length (unit) of the entry field.- Returns:
- The visual length or 15em by default.
setVisualLength
Sets the visual length (unit) of the entry field.- Parameters:
len- The visual length to set.- Returns:
- Successful or not.
- Throws:
PropException
getApproximateSize
Returns the size of the component in pixels. The size is a calculation and does not exactly reflect the real size that may be different due to additional styles not taken into account by this method. The size is calculated from the font of the component and default or defined values (such as character length or number of lines for text area).- Specified by:
getApproximateSizein classUIComp- Returns:
- The size of the component.
getHorizontallyExpand
public boolean getHorizontallyExpand()Gets the horizontally expand option.- Returns:
- The expand option.
setHorizontallyExpand
public boolean setHorizontallyExpand(boolean on) Sets the horizontally expand option.- Parameters:
on- Set the expand option.- Returns:
- true for value changed, false for no change.
getAlignTrailing
public boolean getAlignTrailing()Gets the text align trailing option.- Returns:
- The text align trailing option.
setAlignTrailing
public boolean setAlignTrailing(boolean on) Sets the text align trailing option.- Parameters:
on- Set text align trailing option.- Returns:
- true for value changed, false for no change.
getMinWidth
setMinWidth
Sets the entry field minimum width.- Parameters:
min- Set the minimum length.- Returns:
- true for value changed, false for no change.
- Throws:
PropException
getMaxWidth
setMaxWidth
Sets the entry field maximum width.- Parameters:
max- Set the maximum length.- Returns:
- true for value changed, false for no change.
- Throws:
PropException
getCharUpdate
public boolean getCharUpdate()Gets the character update option.- Returns:
- The expand option.
setCharUpdate
public boolean setCharUpdate(boolean on) Sets the character update option.- Parameters:
on- Set the character update option.- Returns:
- true for value changed, false for no change.
getCharCase
public int getCharCase()Gets the character case option.- Returns:
- The character case option: 0=normal, 1=upper, 2=lower, 3=proper.
setCharCase
public boolean setCharCase(int cc) Sets the character case option.- Parameters:
cc- The option to set: 0=normal, 1=upper, 2=lower, 3=proper.- Returns:
- Successful or not.
getTrim
public boolean getTrim()Gets the trim option.- Returns:
- The trim option.
setTrim
public boolean setTrim(boolean on) Sets the trim option.- Parameters:
on- Set the trim option.- Returns:
- true for value changed, false for no change.
getEntryFieldType
Gets the entry field type defined.- Returns:
- The entry field type.
setEntryFieldType
Sets the entry field type.- Parameters:
type- The new type.- Returns:
- true for value changed, false for no change.
getAutocomplete
Gets the HTMLautocompletetokens the client sets on the input element, e.g.username,current-password,new-password,one-time-codeorusername webauthnfor passkey autofill.- Returns:
- The tokens, or null when not defined: the client then sets
off.
setAutocomplete
Sets the HTMLautocompletetokens the client sets on the input element. Browsers offer their password manager and passkey autofill only for fields carrying the matching tokens, e.g.usernameandcurrent-passwordon a sign-in form; a field without the property keepsoff.- Parameters:
tokens- The tokens; null or blank removes the property, which givesoffon the client.- Returns:
- true for value changed, false for no change.
- Throws:
PropException- If the property cannot be removed.
getInputMode
Gets the HTMLinputmodethe client sets on the input element: the virtual keyboard a touch device shows, whatever the field type is, e.g.numericfor a code typed in a field of the normal type.- Returns:
- The input mode, or null when not defined: the client then sets no attribute.
setInputMode
Sets the HTMLinputmodethe client sets on the input element: the virtual keyboard a touch device shows.- Parameters:
mode- One ofnone,text,decimal,numeric,tel,search,emailorurl; null or blank removes the property, and the client then sets no attribute.- Returns:
- true for value changed, false for no change.
- Throws:
PropException- If the property cannot be removed.
getAutocapitalize
Gets the HTMLautocapitalizethe client sets on the input element: how a virtual keyboard capitalizes what is typed.- Returns:
- The capitalization, or null when not defined: the client then sets no attribute.
setAutocapitalize
Sets the HTMLautocapitalizethe client sets on the input element: how a virtual keyboard capitalizes what is typed. A user name, an e-mail address or a code takesnone.- Parameters:
capitalize- One ofnone,sentences,wordsorcharacters; null or blank removes the property, and the client then sets no attribute.- Returns:
- true for value changed, false for no change.
- Throws:
PropException- If the property cannot be removed.
getSpellcheck
Gets the HTMLspellcheckthe client sets on the input element.- Returns:
Boolean.TRUEto check the spelling,Boolean.FALSEnot to, or null when not defined: the client then sets no attribute and the Browser decides.
setSpellcheck
Sets the HTMLspellcheckthe client sets on the input element. A user name, an e-mail address or a code takesfalse.- Parameters:
check-Boolean.TRUEto check the spelling,Boolean.FALSEnot to; null removes the property, and the client then sets no attribute.- Returns:
- true for value changed, false for no change.
getEnterKeyHint
Gets the HTMLenterkeyhintthe client sets on the input element: the label or the icon of the Enter key of a virtual keyboard.- Returns:
- The hint, or null when not defined: the client then sets no attribute.
setEnterKeyHint
Sets the HTMLenterkeyhintthe client sets on the input element: the label or the icon of the Enter key of a virtual keyboard.- Parameters:
hint- One ofenter,done,go,next,previous,searchorsend; null or blank removes the property, and the client then sets no attribute.- Returns:
- true for value changed, false for no change.
- Throws:
PropException- If the property cannot be removed.
getReveal
public boolean getReveal()Gets the reveal option: a field of the typeEntryFieldType.PASSWORDthen has a toggle button that shows the password typed and hides it again.- Returns:
- The reveal option, false by default.
setReveal
public boolean setReveal(boolean on) Sets the reveal option: a field of the typeEntryFieldType.PASSWORDthen has a toggle button that shows the password typed and hides it again. The state of the button is the client's alone, it is never sent to the server. The option does nothing on a field of another type.- Parameters:
on- Set the reveal option.- Returns:
- true for value changed, false for no change.
getRevealShowLabel
Gets the label of the reveal button while the password is hidden, the action it offers.- Returns:
- The label, or null when not defined: the client then uses the English "Show password".
setRevealShowLabel
Sets the label of the reveal button while the password is hidden, the action it offers: its accessible name and its tooltip.- Parameters:
label- The label, e.g. "Show password"; null or blank removes the property, and the client then uses that English text.- Returns:
- true for value changed, false for no change.
getRevealHideLabel
Gets the label of the reveal button while the password is shown, the action it offers.- Returns:
- The label, or null when not defined: the client then uses the English "Hide password".
setRevealHideLabel
Sets the label of the reveal button while the password is shown, the action it offers: its accessible name and its tooltip.- Parameters:
label- The label, e.g. "Hide password"; null or blank removes the property, and the client then uses that English text.- Returns:
- true for value changed, false for no change.
verify
Verifies this text component.The reveal option: on a field that is not of the type password the button is never shown, a WARNING on the
revealproperty; on a password field without both labels the client uses its English texts, an INFO on therevealproperty, since a screen reader then reads English whatever the language of the application is.The sign-in form: a field whose
autocompletetokens make it a sign-in field (username,current-password,new-password,one-time-code,webauthn) needs a container above it - the panel included - with the "Data entry form" option (form), which renders that container as the form element Browser password managers look for. A WARNING on theautocompleteproperty, since the field still works without it. A field outside a panel is not checked, asUIComp.verify(PropVerification)does not check the device type of one.