public abstract class AbstractResetableProperty<T> extends java.lang.Object implements ResetableProperty<T>
Type | Property and Description |
---|---|
javafx.beans.binding.BooleanBinding |
dirty
A property that tracks if the current value differs form the base value.
|
protected abstract javafx.beans.property.Property<T> |
writableBaseValue |
baseValue, value
Modifier and Type | Field and Description |
---|---|
protected javafx.beans.binding.BooleanBinding |
dirty |
Constructor and Description |
---|
AbstractResetableProperty()
The constructor of
AbstractResetableProperty |
AbstractResetableProperty(java.lang.Object bean,
java.lang.String name)
The constructor of
AbstractResetableProperty |
AbstractResetableProperty(java.lang.Object bean,
java.lang.String name,
T baseValue)
The constructor of
AbstractResetableProperty |
AbstractResetableProperty(T baseValue)
The constructor of
AbstractResetableProperty |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkValuesAreNotEqual() |
protected javafx.beans.binding.BooleanBinding |
createDirtyBinding() |
javafx.beans.binding.BooleanBinding |
dirtyProperty()
A property that tracks if the current value differs form the base value.
|
T |
getBaseValue()
Returns the base value of this
ResetableProperty . |
java.lang.Object |
getBean()
Returns the
Object that contains this property. |
java.lang.String |
getName()
Returns the name of this property.
|
T |
getValue()
Returns the current value of this
ResetableProperty . |
boolean |
isDirty()
Query if the current value differs from the base value.
|
ResetableProperty<T> |
rebase()
Sets the current value as the base value.
|
ResetableProperty<T> |
reset()
Sets the base value as the current value.
|
ResetableProperty<T> |
setValue(T value)
Sets the current value.
|
protected abstract javafx.beans.property.Property<T> |
writableBaseValueProperty() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
baseValueProperty, valueProperty
@Nonnull protected abstract javafx.beans.property.Property<T> writableBaseValueProperty
@Nonnull public javafx.beans.binding.BooleanBinding dirtyProperty
dirtyProperty
in interface ResetableProperty<T>
public AbstractResetableProperty()
AbstractResetableProperty
public AbstractResetableProperty(@Nullable T baseValue)
AbstractResetableProperty
baseValue
- the base value of this AbstractResetableProperty
public AbstractResetableProperty(@Nullable java.lang.Object bean, @Nonnull java.lang.String name)
AbstractResetableProperty
bean
- the bean of this AbstractResetableProperty
name
- the name of this AbstractResetableProperty
public AbstractResetableProperty(@Nullable java.lang.Object bean, @Nonnull java.lang.String name, @Nullable T baseValue)
AbstractResetableProperty
bean
- the bean of this AbstractResetableProperty
name
- the name of this AbstractResetableProperty
baseValue
- the base value of this AbstractResetableProperty
@Nonnull protected javafx.beans.binding.BooleanBinding createDirtyBinding()
protected boolean checkValuesAreNotEqual()
@Nonnull protected abstract javafx.beans.property.Property<T> writableBaseValueProperty()
@Nonnull public javafx.beans.binding.BooleanBinding dirtyProperty()
ResetableProperty
dirtyProperty
in interface ResetableProperty<T>
@Nullable public T getBaseValue()
ResetableProperty
ResetableProperty
.getBaseValue
in interface ResetableProperty<T>
@Nullable public T getValue()
ResetableProperty
ResetableProperty
.getValue
in interface ResetableProperty<T>
@Nonnull public ResetableProperty<T> setValue(@Nullable T value)
ResetableProperty
setValue
in interface ResetableProperty<T>
value
- the new valuepublic boolean isDirty()
ResetableProperty
isDirty
in interface ResetableProperty<T>
true
if values differ, false
otherwise@Nonnull public ResetableProperty<T> rebase()
ResetableProperty
rebase
in interface ResetableProperty<T>
ResetableProperty
@Nonnull public ResetableProperty<T> reset()
ResetableProperty
reset
in interface ResetableProperty<T>
ResetableProperty
@Nullable public java.lang.Object getBean()
ResetableProperty
Object
that contains this property. If this property
is not contained in an Object
, null
is returned.getBean
in interface ResetableProperty<T>
Object
or null
@Nonnull public java.lang.String getName()
ResetableProperty
String
.getName
in interface ResetableProperty<T>
String