Interface TextInputControl.Content
- All Superinterfaces:
Observable, ObservableObjectValue<String>, ObservableStringValue, ObservableValue<String>
- Enclosing class:
TextInputControl
Interface representing a text input's content. Since it is an ObservableStringValue,
you can also bind to, or observe the content.
- Since:
- JavaFX 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int start, int end, boolean notifyListeners) Removes a sequence of characters from the content.get(int start, int end) Retrieves a subset of the content.voidInserts a sequence of characters into the content.intlength()Returns the number of characters represented by the content.Methods declared in interface Observable
addListener, removeListener, subscribeModifier and TypeMethodDescriptionvoidaddListener(InvalidationListener listener) Adds anInvalidationListenerwhich will be notified whenever theObservablebecomes invalid.voidremoveListener(InvalidationListener listener) Removes the given listener from the list of listeners, that are notified whenever the value of theObservablebecomes invalid.default SubscriptionCreates aSubscriptionon thisObservablewhich callsinvalidationSubscriberwhenever it becomes invalid.Methods declared in interface ObservableObjectValue
getMethods declared in interface ObservableValue
addListener, flatMap, getValue, map, orElse, removeListener, subscribe, subscribe, whenModifier and TypeMethodDescriptionvoidaddListener(ChangeListener<? super String> listener) Adds aChangeListenerwhich will be notified whenever the value of theObservableValuechanges.default <U> ObservableValue<U> flatMap(Function<? super String, ? extends ObservableValue<? extends U>> mapper) Returns anObservableValuethat holds the value of anObservableValueproduced by applying the given mapping function on this value.getValue()Returns the current value of thisObservableValuedefault <U> ObservableValue<U> Returns anObservableValuethat holds the result of applying the given mapping function on this value.default ObservableValue<String> Returns anObservableValuethat holds this value, or the given constant if it isnull.voidremoveListener(ChangeListener<? super String> listener) Removes the given listener from the list of listeners that are notified whenever the value of theObservableValuechanges.default Subscriptionsubscribe(BiConsumer<? super String, ? super String> changeSubscriber) Creates aSubscriptionon thisObservableValuewhich calls the givenchangeSubscriberwith the old and new value whenever its value changes.default SubscriptionCreates aSubscriptionon thisObservableValuewhich immediately provides the current value to the givenvalueSubscriber, followed by any subsequent values whenever its value changes.default ObservableValue<String> when(ObservableValue<Boolean> condition) Returns anObservableValuethat holds this value and is updated only whenconditionholdstrue.
-
Method Details
-
get
Retrieves a subset of the content.- Parameters:
start- the startend- the end- Returns:
- a subset of the content
-
insert
Inserts a sequence of characters into the content.- Parameters:
index- the indextext- the text stringnotifyListeners- the notify listener flag- Since:
- JavaFX 2.1
-
delete
void delete(int start, int end, boolean notifyListeners) Removes a sequence of characters from the content.- Parameters:
start- the startend- the endnotifyListeners- the notify listener flag- Since:
- JavaFX 2.1
-
length
int length()Returns the number of characters represented by the content.- Returns:
- the number of characters
-