Package io.jmix.ui.component
Interface TextInputField.TextChangeNotifier
- All Known Subinterfaces:
PasswordField
,ResizableTextArea<V>
,TextArea<V>
,TextField<V>
- All Known Implementing Classes:
AbstractTextArea
,PasswordFieldImpl
,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.int
Gets the timeout used to fireTextInputField.TextChangeEvent
s andHasValue.ValueChangeEvent
s when thegetTextChangeEventMode()
isTextInputField.TextChangeEventMode.LAZY
orTextInputField.TextChangeEventMode.TIMEOUT
.void
Sets the mode how the TextField triggersTextInputField.TextChangeEvent
s andHasValue.ValueChangeEvent
s.void
setTextChangeTimeout
(int timeout) The text change timeout modifies how often text change events are communicated to the application whengetTextChangeEventMode()
isTextInputField.TextChangeEventMode.LAZY
orTextInputField.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
Subscription
object
-
getTextChangeTimeout
int getTextChangeTimeout()Gets the timeout used to fireTextInputField.TextChangeEvent
s andHasValue.ValueChangeEvent
s when thegetTextChangeEventMode()
isTextInputField.TextChangeEventMode.LAZY
orTextInputField.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.LAZY
orTextInputField.TextChangeEventMode.TIMEOUT
.- Parameters:
timeout
- timeout in milliseconds
-
getTextChangeEventMode
TextInputField.TextChangeEventMode getTextChangeEventMode()- Returns:
- the mode used to trigger
TextInputField.TextChangeEvent
s andHasValue.ValueChangeEvent
s.
-
setTextChangeEventMode
@StudioProperty(name="textChangeEventMode", defaultValue="LAZY", options={"BLUR","EAGER","TIMEOUT","LAZY"}) void setTextChangeEventMode(TextInputField.TextChangeEventMode mode) Sets the mode how the TextField triggersTextInputField.TextChangeEvent
s andHasValue.ValueChangeEvent
s.- Parameters:
mode
- the new mode
-