// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene.control; /** * {@link SpinnerValueFactory}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link SpinnerValueFactory}) * @param <B> 建構器本身的型態(需繼承{@link SpinnerValueFactoryMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class SpinnerValueFactoryMaker<T extends java.lang.Object, Z extends SpinnerValueFactory<T>, B extends SpinnerValueFactoryMaker<T, Z, B>> extends jxtn.jfx.makers.AbstractMaker<Z, B> implements SpinnerValueFactoryMakerExt<T, Z, B> { private boolean hasConverter; private javafx.util.StringConverter<T> valConverter; private boolean hasValue; private T valValue; private boolean hasWrapAround; private boolean valWrapAround; private boolean bound1Converter; private boolean bound2Converter; private javafx.beans.value.ObservableValue<? extends javafx.util.StringConverter<T>> obsrv1Converter; private javafx.beans.property.Property<javafx.util.StringConverter<T>> obsrv2Converter; private boolean bound1Value; private boolean bound2Value; private javafx.beans.value.ObservableValue<? extends T> obsrv1Value; private javafx.beans.property.Property<T> obsrv2Value; private boolean bound1WrapAround; private boolean bound2WrapAround; private javafx.beans.value.ObservableValue<? extends Boolean> obsrv1WrapAround; private javafx.beans.property.Property<Boolean> obsrv2WrapAround; @Override public void applyTo(Z instance) { super.applyTo(instance); if (this.hasConverter) instance.setConverter(this.valConverter); if (this.hasValue) instance.setValue(this.valValue); if (this.hasWrapAround) instance.setWrapAround(this.valWrapAround); if (this.bound1Converter) instance.converterProperty().bind(this.obsrv1Converter); if (this.bound2Converter) instance.converterProperty().bindBidirectional(this.obsrv2Converter); if (this.bound1Value) instance.valueProperty().bind(this.obsrv1Value); if (this.bound2Value) instance.valueProperty().bindBidirectional(this.obsrv2Value); if (this.bound1WrapAround) instance.wrapAroundProperty().bind(this.obsrv1WrapAround); if (this.bound2WrapAround) instance.wrapAroundProperty().bindBidirectional(this.obsrv2WrapAround); } /** * 設定屬性{@link SpinnerValueFactory#setConverter(javafx.util.StringConverter)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B converter(javafx.util.StringConverter<T> value) { this.hasConverter = true; this.valConverter = value; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#setValue(T)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B value(T value) { this.hasValue = true; this.valValue = value; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#setWrapAround(boolean)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B wrapAround(boolean value) { this.hasWrapAround = true; this.valWrapAround = value; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#converterProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindConverter(javafx.beans.value.ObservableValue<? extends javafx.util.StringConverter<T>> source) { java.util.Objects.requireNonNull(source); this.bound1Converter = true; this.obsrv1Converter = source; this.bound2Converter = false; this.obsrv2Converter = null; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#converterProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalConverter(javafx.beans.property.Property<javafx.util.StringConverter<T>> source) { java.util.Objects.requireNonNull(source); this.bound1Converter = false; this.obsrv1Converter = null; this.bound2Converter = true; this.obsrv2Converter = source; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#valueProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindValue(javafx.beans.value.ObservableValue<? extends T> source) { java.util.Objects.requireNonNull(source); this.bound1Value = true; this.obsrv1Value = source; this.bound2Value = false; this.obsrv2Value = null; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#valueProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalValue(javafx.beans.property.Property<T> source) { java.util.Objects.requireNonNull(source); this.bound1Value = false; this.obsrv1Value = null; this.bound2Value = true; this.obsrv2Value = source; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#wrapAroundProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindWrapAround(javafx.beans.value.ObservableValue<? extends Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1WrapAround = true; this.obsrv1WrapAround = source; this.bound2WrapAround = false; this.obsrv2WrapAround = null; return (B) this; } /** * 設定屬性{@link SpinnerValueFactory#wrapAroundProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalWrapAround(javafx.beans.property.Property<Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1WrapAround = false; this.obsrv1WrapAround = null; this.bound2WrapAround = true; this.obsrv2WrapAround = source; return (B) this; } }