Package io.jmix.ui.component
Interface TextInputField.TextChangeNotifier
- All Known Subinterfaces:
ResizableTextArea<V>,TextArea<V>,TextField<V>
- All Known Implementing Classes:
AbstractTextArea,ResizableTextAreaImpl,TextAreaImpl,TextFieldImpl
- Enclosing interface:
- TextInputField<V>
public static interface TextInputField.TextChangeNotifier
An interface for UI components that provide additional methods for text change handling.
-
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that is fired when the component value is changed.intGets the timeout used to fireTextInputField.TextChangeEvents andHasValue.ValueChangeEvents when thegetTextChangeEventMode()isTextInputField.TextChangeEventMode.LAZYorTextInputField.TextChangeEventMode.TIMEOUT.voidSets the mode how the TextField triggersTextInputField.TextChangeEvents andHasValue.ValueChangeEvents.voidsetTextChangeTimeout(int timeout) The text change timeout modifies how often text change events are communicated to the application whengetTextChangeEventMode()isTextInputField.TextChangeEventMode.LAZYorTextInputField.TextChangeEventMode.TIMEOUT.
-
Method Details
-
addTextChangeListener
Adds a listener that is fired when the component value is changed.- Parameters:
listener- a listener to add- Returns:
- a
Subscriptionobject
-
getTextChangeTimeout
int getTextChangeTimeout()Gets the timeout used to fireTextInputField.TextChangeEvents andHasValue.ValueChangeEvents when thegetTextChangeEventMode()isTextInputField.TextChangeEventMode.LAZYorTextInputField.TextChangeEventMode.TIMEOUT.- Returns:
- timeout in milliseconds
-
setTextChangeTimeout
@StudioProperty(name="textChangeTimeout", defaultValue="400") void setTextChangeTimeout(int timeout) The text change timeout modifies how often text change events are communicated to the application whengetTextChangeEventMode()isTextInputField.TextChangeEventMode.LAZYorTextInputField.TextChangeEventMode.TIMEOUT.- Parameters:
timeout- timeout in milliseconds
-
getTextChangeEventMode
TextInputField.TextChangeEventMode getTextChangeEventMode()- Returns:
- the mode used to trigger
TextInputField.TextChangeEvents andHasValue.ValueChangeEvents.
-
setTextChangeEventMode
@StudioProperty(name="textChangeEventMode", defaultValue="LAZY", options={"BLUR","EAGER","TIMEOUT","LAZY"}) void setTextChangeEventMode(TextInputField.TextChangeEventMode mode) Sets the mode how the TextField triggersTextInputField.TextChangeEvents andHasValue.ValueChangeEvents.- Parameters:
mode- the new mode
-