// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene.control; /** * {@link TextField}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link TextField}) * @param <B> 建構器本身的型態(需繼承{@link TextFieldMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class TextFieldMaker<Z extends TextField, B extends TextFieldMaker<Z, B>> extends javafx.scene.control.TextInputControlMaker<Z, B> implements TextFieldMakerExt<Z, B> { private boolean hasAlignment; private javafx.geometry.Pos valAlignment; private boolean hasOnAction; private javafx.event.EventHandler<javafx.event.ActionEvent> valOnAction; private boolean hasPrefColumnCount; private int valPrefColumnCount; private boolean bound1Alignment; private boolean bound2Alignment; private javafx.beans.value.ObservableValue<? extends javafx.geometry.Pos> obsrv1Alignment; private javafx.beans.property.Property<javafx.geometry.Pos> obsrv2Alignment; private boolean bound1OnAction; private boolean bound2OnAction; private javafx.beans.value.ObservableValue<? extends javafx.event.EventHandler<javafx.event.ActionEvent>> obsrv1OnAction; private javafx.beans.property.Property<javafx.event.EventHandler<javafx.event.ActionEvent>> obsrv2OnAction; private boolean bound1PrefColumnCount; private boolean bound2PrefColumnCount; private javafx.beans.value.ObservableValue<? extends Number> obsrv1PrefColumnCount; private javafx.beans.property.Property<Number> obsrv2PrefColumnCount; @Override public void applyTo(Z instance) { super.applyTo(instance); if (this.hasAlignment) instance.setAlignment(this.valAlignment); if (this.hasOnAction) instance.setOnAction(this.valOnAction); if (this.hasPrefColumnCount) instance.setPrefColumnCount(this.valPrefColumnCount); if (this.bound1Alignment) instance.alignmentProperty().bind(this.obsrv1Alignment); if (this.bound2Alignment) instance.alignmentProperty().bindBidirectional(this.obsrv2Alignment); if (this.bound1OnAction) instance.onActionProperty().bind(this.obsrv1OnAction); if (this.bound2OnAction) instance.onActionProperty().bindBidirectional(this.obsrv2OnAction); if (this.bound1PrefColumnCount) instance.prefColumnCountProperty().bind(this.obsrv1PrefColumnCount); if (this.bound2PrefColumnCount) instance.prefColumnCountProperty().bindBidirectional(this.obsrv2PrefColumnCount); } /** * 設定屬性{@link TextField#setAlignment(javafx.geometry.Pos)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B alignment(javafx.geometry.Pos value) { this.hasAlignment = true; this.valAlignment = value; return (B) this; } /** * 設定屬性{@link TextField#setOnAction(javafx.event.EventHandler)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B onAction(javafx.event.EventHandler<javafx.event.ActionEvent> value) { this.hasOnAction = true; this.valOnAction = value; return (B) this; } /** * 設定屬性{@link TextField#setPrefColumnCount(int)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B prefColumnCount(int value) { this.hasPrefColumnCount = true; this.valPrefColumnCount = value; return (B) this; } /** * 設定屬性{@link TextField#alignmentProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindAlignment(javafx.beans.value.ObservableValue<? extends javafx.geometry.Pos> source) { java.util.Objects.requireNonNull(source); this.bound1Alignment = true; this.obsrv1Alignment = source; this.bound2Alignment = false; this.obsrv2Alignment = null; return (B) this; } /** * 設定屬性{@link TextField#alignmentProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalAlignment(javafx.beans.property.Property<javafx.geometry.Pos> source) { java.util.Objects.requireNonNull(source); this.bound1Alignment = false; this.obsrv1Alignment = null; this.bound2Alignment = true; this.obsrv2Alignment = source; return (B) this; } /** * 設定屬性{@link TextField#onActionProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindOnAction(javafx.beans.value.ObservableValue<? extends javafx.event.EventHandler<javafx.event.ActionEvent>> source) { java.util.Objects.requireNonNull(source); this.bound1OnAction = true; this.obsrv1OnAction = source; this.bound2OnAction = false; this.obsrv2OnAction = null; return (B) this; } /** * 設定屬性{@link TextField#onActionProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalOnAction(javafx.beans.property.Property<javafx.event.EventHandler<javafx.event.ActionEvent>> source) { java.util.Objects.requireNonNull(source); this.bound1OnAction = false; this.obsrv1OnAction = null; this.bound2OnAction = true; this.obsrv2OnAction = source; return (B) this; } /** * 設定屬性{@link TextField#prefColumnCountProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindPrefColumnCount(javafx.beans.value.ObservableValue<? extends Number> source) { java.util.Objects.requireNonNull(source); this.bound1PrefColumnCount = true; this.obsrv1PrefColumnCount = source; this.bound2PrefColumnCount = false; this.obsrv2PrefColumnCount = null; return (B) this; } /** * 設定屬性{@link TextField#prefColumnCountProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalPrefColumnCount(javafx.beans.property.Property<Number> source) { java.util.Objects.requireNonNull(source); this.bound1PrefColumnCount = false; this.obsrv1PrefColumnCount = null; this.bound2PrefColumnCount = true; this.obsrv2PrefColumnCount = source; return (B) this; } /** * 建構{@link TextField}物件。 * * @return 新的{@link TextField}物件實體 */ @Override @SuppressWarnings("unchecked") public TextField build() { TextField instance = new TextField(); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link TextField}物件。 * * @return 新的{@link TextField}物件實體 */ @SuppressWarnings("unchecked") public TextField build(java.lang.String arg0) { TextField instance = new TextField(arg0); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } }