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> void
consume
(ObservableValue<T> property, Consumer<T> consumer) static <T> ObservableValue<T>
filter
(ObservableValue<T> property, Predicate<T> predicate) static <T> void
onPropertySet
(ObservableValue<T> property, Consumer<T> valueConsumer) static <T> void
onPropertySet
(ObservableValue<T> property, Consumer<T> valueConsumer, boolean callIfNullProperty) 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 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> 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)
-
Constructor Details
-
FXProperties
public FXProperties()
-
-
Method Details
-
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) -
compute
public static <T,R> ObservableValue<R> compute(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
-