Package org.teamapps.ux.component.field
Class TextField
- java.lang.Object
-
- org.teamapps.ux.component.AbstractComponent
-
- org.teamapps.ux.component.field.AbstractField<java.lang.String>
-
- org.teamapps.ux.component.field.TextField
-
- All Implemented Interfaces:
Component,TextInputHandlingField
- Direct Known Subclasses:
MultiLineTextField,PasswordField
public class TextField extends AbstractField<java.lang.String> implements TextInputHandlingField
-
-
Field Summary
Fields Modifier and Type Field Description Event<SpecialKey>onSpecialKeyPressedEvent<java.lang.String>onTextInput-
Fields inherited from class org.teamapps.ux.component.field.AbstractField
onValueChanged, onVisibilityChanged
-
Fields inherited from class org.teamapps.ux.component.AbstractComponent
onDestroyed, onRendered
-
-
Constructor Summary
Constructors Constructor Description TextField()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.teamapps.dto.UiFieldcreateUiComponent()protected voiddoDestroy()Override this method to release resources whenever this component gets destroyedjava.lang.StringgetEmptyText()intgetMaxCharacters()voidhandleUiEvent(org.teamapps.dto.UiEvent event)booleanisEmpty()Whether this field can be regarded as empty / "no user input".booleanisShowClearButton()Event<SpecialKey>onSpecialKeyPressed()Event<java.lang.String>onTextInput()TextFieldsetEmptyText(java.lang.String emptyText)TextFieldsetMaxCharacters(int maxCharacters)TextFieldsetShowClearButton(boolean showClearButton)-
Methods inherited from class org.teamapps.ux.component.field.AbstractField
addCustomFieldMessage, addValidator, applyValueFromUi, clearCustomFieldMessages, convertUiValueToUxValue, convertUxValueToUiValue, focus, getCustomFieldMessages, getDefaultMessagePosition, getDefaultMessageVisibility, getEditingMode, getFieldMessages, getMaxFieldMessageSeverity, getValidators, getValue, isRequired, isValid, isVisible, mapAbstractFieldAttributesToUiField, removeCustomFieldMessage, removeValidator, setAndLockValue, setCustomFieldMessages, setDefaultMessagePosition, setDefaultMessageVisibility, setEditingMode, setRequired, setValue, setVisible, validate
-
Methods inherited from class org.teamapps.ux.component.AbstractComponent
createUiComponentReference, destroy, getId, getParent, getSessionContext, isDestroyed, isEffectivelyVisible, isRendered, mapAbstractUiComponentProperties, queueCommandIfRendered, render, reRenderIfRendered, setCssStyle, setMargin, setMaxHeight, setMaxWidth, setMinHeight, setMinWidth, setParent, setShadow, toString, unrender
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.teamapps.ux.component.Component
setCssStyle
-
Methods inherited from interface org.teamapps.ux.component.field.TextInputHandlingField
defaultHandleTextInputEvent
-
-
-
-
Field Detail
-
onTextInput
public final Event<java.lang.String> onTextInput
-
onSpecialKeyPressed
public final Event<SpecialKey> onSpecialKeyPressed
-
-
Method Detail
-
getMaxCharacters
public int getMaxCharacters()
-
setMaxCharacters
public TextField setMaxCharacters(int maxCharacters)
-
isShowClearButton
public boolean isShowClearButton()
-
setShowClearButton
public TextField setShowClearButton(boolean showClearButton)
-
getEmptyText
public java.lang.String getEmptyText()
-
setEmptyText
public TextField setEmptyText(java.lang.String emptyText)
-
createUiComponent
public org.teamapps.dto.UiField createUiComponent()
- Specified by:
createUiComponentin classAbstractComponent
-
handleUiEvent
public void handleUiEvent(org.teamapps.dto.UiEvent event)
- Specified by:
handleUiEventin interfaceComponent- Overrides:
handleUiEventin classAbstractField<java.lang.String>
-
isEmpty
public boolean isEmpty()
Description copied from class:AbstractFieldWhether this field can be regarded as empty / "no user input". Override for field-specific behaviour.- Overrides:
isEmptyin classAbstractField<java.lang.String>- Returns:
- true if the value can be regarded as "empty".
-
doDestroy
protected void doDestroy()
Description copied from class:AbstractComponentOverride this method to release resources whenever this component gets destroyed- Overrides:
doDestroyin classAbstractComponent
-
onTextInput
public Event<java.lang.String> onTextInput()
- Specified by:
onTextInputin interfaceTextInputHandlingField
-
onSpecialKeyPressed
public Event<SpecialKey> onSpecialKeyPressed()
- Specified by:
onSpecialKeyPressedin interfaceTextInputHandlingField
-
-