Package dev.webfx.kit.util.properties
Class FXProperties
java.lang.Object
dev.webfx.kit.util.properties.FXProperties
- Author:
- Bruno Salmon
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <A,
B> void bindConverted
(Property<A> pA, ObservableValue<B> pB, Function<B, A> baConverter) static <A,
B> void bindConvertedBidirectional
(Property<A> pA, Property<B> pB, Function<B, A> baConverter, Function<A, B> abConverter) static <T1,
T2, R> ObservableValue<R> combine
(ObservableValue<? extends T1> p1, ObservableValue<? extends T2> p2, BiFunction<? super T1, ? super T2, ? extends R> combineFunction) static <T,
R> ObservableValue<R> compute
(ObservableValue<? extends T> p, Function<? super T, ? extends R> function) static <T,
R> ObservableValue<R> computeDeferred
(ObservableValue<? extends T> p, Function<? super T, ? extends R> function) static <T> void
consume
(ObservableValue<T> property, Consumer<T> consumer) static <T> ObservableValue<T>
static <T> ObservableValue<T>
filter
(ObservableValue<T> property, Predicate<T> predicate) static BooleanProperty
newBooleanProperty
(boolean initialValue, Runnable onInvalidated) static BooleanProperty
newBooleanProperty
(boolean initialValue, Consumer<Boolean> onInvalidated) static BooleanProperty
newBooleanProperty
(Runnable onInvalidated) static BooleanProperty
newBooleanProperty
(Consumer<Boolean> onInvalidated) static DoubleProperty
newDoubleProperty
(double initialValue, Runnable onInvalidated) static DoubleProperty
newDoubleProperty
(double initialValue, Consumer<Double> onInvalidated) static DoubleProperty
newDoubleProperty
(Runnable onInvalidated) static DoubleProperty
newDoubleProperty
(Consumer<Double> onInvalidated) static IntegerProperty
newIntegerProperty
(int initialValue, Runnable onInvalidated) static IntegerProperty
newIntegerProperty
(int initialValue, Consumer<Integer> onInvalidated) static IntegerProperty
newIntegerProperty
(Runnable onInvalidated) static IntegerProperty
newIntegerProperty
(Consumer<Integer> onInvalidated) static <T> ObjectProperty<T>
newObjectProperty
(Runnable onInvalidated) static <T> ObjectProperty<T>
newObjectProperty
(Consumer<T> onInvalidated) static <T> ObjectProperty<T>
newObjectProperty
(T initialValue, Runnable onInvalidated) static <T> ObjectProperty<T>
newObjectProperty
(T initialValue, Consumer<T> onInvalidated) static <T> void
onPropertySet
(ObservableValue<T> property, Consumer<T> valueConsumer) static <T> void
onPropertySet
(ObservableValue<T> property, Consumer<T> valueConsumer, boolean callIfNullProperty) static Unregisterable
runNowAndOnDoublePropertyChange
(Consumer<Double> newValueListener, ObservableValue<Number> property) static Unregisterable
runNowAndOnPropertiesChange
(Runnable runnable, Collection<ObservableValue> properties) static Unregisterable
runNowAndOnPropertiesChange
(Runnable runnable, ObservableValue... properties) static Unregisterable
runNowAndOnPropertiesChange
(Consumer<ObservableValue> consumer, Collection<ObservableValue> properties) static Unregisterable
runNowAndOnPropertiesChange
(Consumer<ObservableValue> consumer, ObservableValue... properties) static <T> Unregisterable
runNowAndOnPropertyChange
(Runnable listener, ObservableValue<T> property) static <T> Unregisterable
runNowAndOnPropertyChange
(Consumer<? super T> newValueListener, ObservableValue<T> property) static <T> Unregisterable
runNowAndOnPropertyChange
(ChangeListener<? super T> listener, ObservableValue<T> property) static Unregisterable
runOnDoublePropertyChange
(Consumer<Double> newValueListener, ObservableValue<Number> property) static Unregisterable
runOnIntegerPropertyChange
(Consumer<Integer> newValueListener, ObservableValue<Number> property) static Unregisterable
runOnPropertiesChange
(Runnable runnable, Collection<ObservableValue> properties) static Unregisterable
runOnPropertiesChange
(Runnable runnable, ObservableValue... properties) static Unregisterable
runOnPropertiesChange
(Consumer<ObservableValue> consumer, Collection<ObservableValue> properties) static Unregisterable
runOnPropertiesChange
(Consumer<ObservableValue> consumer, ObservableValue... properties) static <T> Unregisterable
runOnPropertyChange
(Runnable listener, ObservableValue<T> property) static <T> Unregisterable
runOnPropertyChange
(Consumer<? super T> newValueListener, ObservableValue<T> property) static <T> Unregisterable
runOnPropertyChange
(ChangeListener<? super T> listener, ObservableValue<T> property) static <T> Unregisterable
runOrUnregisterOnPropertyChange
(UnregisterableChangeListener<T> unregisterableChangeListener, ObservableValue<T> property) static <T> void
setEvenIfBound
(Property<T> property, T value) static <T> void
setIfNotBound
(Property<T> property, T value) static <T> void
setIfNotEquals
(Property<T> property, T value) static void
-
Constructor Details
-
FXProperties
public FXProperties()
-
-
Method Details
-
runOnPropertyChange
public static <T> Unregisterable runOnPropertyChange(ChangeListener<? super T> listener, ObservableValue<T> property) -
runOrUnregisterOnPropertyChange
public static <T> Unregisterable runOrUnregisterOnPropertyChange(UnregisterableChangeListener<T> unregisterableChangeListener, ObservableValue<T> property) -
runOnPropertyChange
public static <T> Unregisterable runOnPropertyChange(Consumer<? super T> newValueListener, ObservableValue<T> property) -
runOnPropertyChange
public static <T> Unregisterable runOnPropertyChange(Runnable listener, ObservableValue<T> property) -
runOnDoublePropertyChange
public static Unregisterable runOnDoublePropertyChange(Consumer<Double> newValueListener, ObservableValue<Number> property) -
runOnIntegerPropertyChange
public static Unregisterable runOnIntegerPropertyChange(Consumer<Integer> newValueListener, ObservableValue<Number> property) -
runNowAndOnPropertyChange
public static <T> Unregisterable runNowAndOnPropertyChange(ChangeListener<? super T> listener, ObservableValue<T> property) -
runNowAndOnPropertyChange
public static <T> Unregisterable runNowAndOnPropertyChange(Consumer<? super T> newValueListener, ObservableValue<T> property) -
runNowAndOnPropertyChange
public static <T> Unregisterable runNowAndOnPropertyChange(Runnable listener, ObservableValue<T> property) -
runNowAndOnDoublePropertyChange
public static Unregisterable runNowAndOnDoublePropertyChange(Consumer<Double> newValueListener, ObservableValue<Number> property) -
runOnPropertiesChange
public static Unregisterable runOnPropertiesChange(Consumer<ObservableValue> consumer, ObservableValue... properties) -
runNowAndOnPropertiesChange
public static Unregisterable runNowAndOnPropertiesChange(Consumer<ObservableValue> consumer, ObservableValue... properties) -
runNowAndOnPropertiesChange
public static Unregisterable runNowAndOnPropertiesChange(Consumer<ObservableValue> consumer, Collection<ObservableValue> properties) -
runOnPropertiesChange
public static Unregisterable runOnPropertiesChange(Consumer<ObservableValue> consumer, Collection<ObservableValue> properties) -
runOnPropertiesChange
public static Unregisterable runOnPropertiesChange(Runnable runnable, ObservableValue... properties) -
runNowAndOnPropertiesChange
public static Unregisterable runNowAndOnPropertiesChange(Runnable runnable, ObservableValue... properties) -
runNowAndOnPropertiesChange
public static Unregisterable runNowAndOnPropertiesChange(Runnable runnable, Collection<ObservableValue> properties) -
runOnPropertiesChange
public static Unregisterable runOnPropertiesChange(Runnable runnable, Collection<ObservableValue> properties) -
deferredProperty
-
compute
public static <T,R> ObservableValue<R> compute(ObservableValue<? extends T> p, Function<? super T, ? extends R> function) -
computeDeferred
public static <T,R> ObservableValue<R> computeDeferred(ObservableValue<? extends T> p, Function<? super T, ? extends R> function) -
combine
public static <T1,T2, ObservableValue<R> combineR> (ObservableValue<? extends T1> p1, ObservableValue<? extends T2> p2, BiFunction<? super T1, ? super T2, ? extends R> combineFunction) -
filter
-
consume
-
setIfNotBound
-
setEvenIfBound
-
setIfNotEquals
-
onPropertySet
-
onPropertySet
public static <T> void onPropertySet(ObservableValue<T> property, Consumer<T> valueConsumer, boolean callIfNullProperty) -
bindConverted
public static <A,B> void bindConverted(Property<A> pA, ObservableValue<B> pB, Function<B, A> baConverter) -
bindConvertedBidirectional
-
newBooleanProperty
public static BooleanProperty newBooleanProperty(boolean initialValue, Consumer<Boolean> onInvalidated) -
newBooleanProperty
-
newBooleanProperty
-
newBooleanProperty
-
newIntegerProperty
-
newIntegerProperty
-
newIntegerProperty
-
newIntegerProperty
-
newObjectProperty
-
newDoubleProperty
-
newDoubleProperty
-
newDoubleProperty
-
newDoubleProperty
-
newObjectProperty
-
newObjectProperty
-
newObjectProperty
-
toggleProperty
-