// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene.control; /** * {@link TextFormatter}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link TextFormatter}) * @param <B> 建構器本身的型態(需繼承{@link TextFormatterMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class TextFormatterMaker<V extends java.lang.Object, Z extends TextFormatter<V>, B extends TextFormatterMaker<V, Z, B>> extends jxtn.jfx.makers.AbstractMaker<Z, B> implements TextFormatterMakerExt<V, Z, B> { private boolean hasValue; private V valValue; private boolean bound1Value; private boolean bound2Value; private javafx.beans.value.ObservableValue<? extends V> obsrv1Value; private javafx.beans.property.Property<V> obsrv2Value; @Override public void applyTo(Z instance) { super.applyTo(instance); if (this.hasValue) instance.setValue(this.valValue); if (this.bound1Value) instance.valueProperty().bind(this.obsrv1Value); if (this.bound2Value) instance.valueProperty().bindBidirectional(this.obsrv2Value); } /** * 設定屬性{@link TextFormatter#setValue(V)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B value(V value) { this.hasValue = true; this.valValue = value; return (B) this; } /** * 設定屬性{@link TextFormatter#valueProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindValue(javafx.beans.value.ObservableValue<? extends V> source) { java.util.Objects.requireNonNull(source); this.bound1Value = true; this.obsrv1Value = source; this.bound2Value = false; this.obsrv2Value = null; return (B) this; } /** * 設定屬性{@link TextFormatter#valueProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalValue(javafx.beans.property.Property<V> source) { java.util.Objects.requireNonNull(source); this.bound1Value = false; this.obsrv1Value = null; this.bound2Value = true; this.obsrv2Value = source; return (B) this; } /** * 建構{@link TextFormatter}物件。 * * @return 新的{@link TextFormatter}物件實體 */ @SuppressWarnings("unchecked") public TextFormatter<V> build(java.util.function.UnaryOperator<javafx.scene.control.TextFormatter.Change> arg0) { TextFormatter<V> instance = new TextFormatter<V>(arg0); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link TextFormatter}物件。 * * @return 新的{@link TextFormatter}物件實體 */ @SuppressWarnings("unchecked") public TextFormatter<V> build(javafx.util.StringConverter<V> arg0) { TextFormatter<V> instance = new TextFormatter<V>(arg0); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link TextFormatter}物件。 * * @return 新的{@link TextFormatter}物件實體 */ @SuppressWarnings("unchecked") public TextFormatter<V> build(javafx.util.StringConverter<V> arg0, V arg1) { TextFormatter<V> instance = new TextFormatter<V>(arg0, arg1); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link TextFormatter}物件。 * * @return 新的{@link TextFormatter}物件實體 */ @SuppressWarnings("unchecked") public TextFormatter<V> build(javafx.util.StringConverter<V> arg0, V arg1, java.util.function.UnaryOperator<javafx.scene.control.TextFormatter.Change> arg2) { TextFormatter<V> instance = new TextFormatter<V>(arg0, arg1, arg2); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } }