Package org.apache.pivot.wtk
Interface TextInputContentListener
-
- All Known Implementing Classes:
TerraTextInputSkin
,TextInputContentListener.Adapter
,TextInputContentListener.Listeners
public interface TextInputContentListener
Text input text listener.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TextInputContentListener.Adapter
Deprecated.Since 2.1 and Java 8 the interface itself has default implementations.static class
TextInputContentListener.Listeners
Text input content listener listeners list.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
insertTextVetoed(TextInput textInput, Vote reason)
Called when a text insertion has been vetoed.default Vote
previewInsertText(TextInput textInput, java.lang.CharSequence text, int index)
Called to preview a text insertion.default Vote
previewRemoveText(TextInput textInput, int index, int count)
Called to preview a text removal.default void
removeTextVetoed(TextInput textInput, Vote reason)
Called when a text removal has been vetoed.default void
textChanged(TextInput textInput)
Called when a text input's text has changed.default void
textInserted(TextInput textInput, int index, int count)
Called when text has been inserted into a text input.default void
textRemoved(TextInput textInput, int index, int count)
Called when text has been removed from a text input.
-
-
-
Method Detail
-
previewInsertText
default Vote previewInsertText(TextInput textInput, java.lang.CharSequence text, int index)
Called to preview a text insertion.- Parameters:
textInput
- The source of the event.text
- The text that will be inserted.index
- The index at which the text will be inserted.- Returns:
- The accumulated vote as to whether to allow this insertion.
-
insertTextVetoed
default void insertTextVetoed(TextInput textInput, Vote reason)
Called when a text insertion has been vetoed.- Parameters:
textInput
- The source of the event.reason
- The reason the event was vetoed.
-
textInserted
default void textInserted(TextInput textInput, int index, int count)
Called when text has been inserted into a text input.- Parameters:
textInput
- The source of the event.index
- The index at which the text was inserted.count
- The number of characters that were inserted.
-
previewRemoveText
default Vote previewRemoveText(TextInput textInput, int index, int count)
Called to preview a text removal.- Parameters:
textInput
- The source of the event.index
- The starting index from which the text will be removed.count
- The count of characters to be removed starting from that index.- Returns:
- The accumulated vote as to whether to allow this removal.
-
removeTextVetoed
default void removeTextVetoed(TextInput textInput, Vote reason)
Called when a text removal has been vetoed.- Parameters:
textInput
- The source of the event.reason
- The reason the event was vetoed.
-
textRemoved
default void textRemoved(TextInput textInput, int index, int count)
Called when text has been removed from a text input.- Parameters:
textInput
- The source of the event.index
- The index from which the text was removed.count
- The number of characters that were removed.
-
textChanged
default void textChanged(TextInput textInput)
Called when a text input's text has changed.- Parameters:
textInput
- The source of the event.
-
-