StringPropertyBase is the base class for a property
wrapping a String value.
It provides all the functionality required for a property except for the
getBean() and getName() methods, which must be implemented
by extending classes.
StringProperty
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private ExpressionHelper | |
| private InvalidationListener | |
| private ObservableValue | |
| private boolean | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | StringPropertyBase(String
the initial value of the wrapped initialValue)StringThe constructor of the |
| Modifier and Type | Method and Description |
|---|---|
| public void | addListener(InvalidationListener listener)
Implements javafx. Adds an |
| public void | addListener(ChangeListener<? super String> listener)
Implements javafx. Adds a |
| public void | bind(ObservableValue<? extends String> newObservable)
Implements javafx. Create a unidirection binding for this |
| protected void | fireValueChangedEvent()
Sends notifications to all attached
|
| public String | get()
Implements javafx. Get the wrapped value. |
| protected void | |
| public boolean | isBound()
Implements javafx. Can be used to check, if a |
| private void | |
| public void | removeListener(InvalidationListener listener)
Implements javafx. Removes the given listener from the list of listeners, that are notified
whenever the value of the |
| public void | removeListener(ChangeListener<? super String> listener)
Implements javafx. Removes the given listener from the list of listeners that are notified
whenever the value of the |
| public void | |
| public String | Returns: a string representation of thisStringPropertyBase object.Overrides javafx. Returns a string representation of this |
| public void | unbind()
Implements javafx. Remove the unidirectional binding for this |
| helper | back to summary |
|---|---|
| private ExpressionHelper<String> helper | |
| listener | back to summary |
|---|---|
| private InvalidationListener listener | |
| observable | back to summary |
|---|---|
| private ObservableValue<? extends String> observable | |
| valid | back to summary |
|---|---|
| private boolean valid | |
| value | back to summary |
|---|---|
| private String value | |
| StringPropertyBase | back to summary |
|---|---|
| public StringPropertyBase() The constructor of the | |
| StringPropertyBase | back to summary |
|---|---|
| public StringPropertyBase(String initialValue) The constructor of the
| |
| addListener | back to summary |
|---|---|
| public void addListener(InvalidationListener listener) Implements javafx. Doc from javafx. Adds an
Note that the same actual
The
| |
| addListener | back to summary |
|---|---|
| public void addListener(ChangeListener<? super String> listener) Implements javafx. Doc from javafx. Adds a
Note that the same actual
The
| |
| bind | back to summary |
|---|---|
| public void bind(ObservableValue<? extends String> newObservable) Implements javafx. Doc from javafx. Create a unidirection binding for this Note that JavaFX has all the bind calls implemented through weak listeners. This means the bound property can be garbage collected and stopped from being updated.
| |
| fireValueChangedEvent | back to summary |
|---|---|
| protected void fireValueChangedEvent() Sends notifications to all attached
| |
| get | back to summary |
|---|---|
| public String get() Implements javafx. Doc from javafx. Get the wrapped value. This must be identical to
the value returned from
This method exists only to align WritableObjectValue API with
| |
| invalidated | back to summary |
|---|---|
| protected void invalidated() The method | |
| isBound | back to summary |
|---|---|
| public boolean isBound() Implements javafx. Doc from javafx. Can be used to check, if a
| |
| markInvalid | back to summary |
|---|---|
| private void markInvalid() | |
| removeListener | back to summary |
|---|---|
| public void removeListener(InvalidationListener listener) Implements javafx. Doc from javafx. Removes the given listener from the list of listeners, that are notified
whenever the value of the If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
| |
| removeListener | back to summary |
|---|---|
| public void removeListener(ChangeListener<? super String> listener) Implements javafx. Doc from javafx. Removes the given listener from the list of listeners that are notified
whenever the value of the If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
| |
| set | back to summary |
|---|---|
| public void set(String newValue) Implements javafx. Doc from javafx. Set the wrapped value.
Should be equivalent to
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides javafx. Returns a string representation of this | |
| unbind | back to summary |
|---|---|
| public void unbind() Implements javafx. Doc from javafx. Remove the unidirectional binding for this
| |
| Modifier and Type | Field and Description |
|---|---|
| private final WeakReference |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | invalidated(Observable observable)
Implements javafx. This method needs to be provided by an implementation of
|
| public boolean | wasGarbageCollected()
Implements javafx. Returns |
| wref | back to summary |
|---|---|
| private final WeakReference<StringPropertyBase> wref | |
| Listener | back to summary |
|---|---|
| public Listener(StringPropertyBase ref) | |
| invalidated | back to summary |
|---|---|
| public void invalidated(Observable observable) Implements javafx. Doc from javafx. This method needs to be provided by an implementation of
In general, it is considered bad practice to modify the observed value in this method.
| |
| wasGarbageCollected | back to summary |
|---|---|
| public boolean wasGarbageCollected() Implements javafx. Doc from javafx. Returns
| |