// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene.control; /** * {@link CheckBox}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link CheckBox}) * @param <B> 建構器本身的型態(需繼承{@link CheckBoxMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class CheckBoxMaker<Z extends CheckBox, B extends CheckBoxMaker<Z, B>> extends javafx.scene.control.ButtonBaseMaker<Z, B> implements CheckBoxMakerExt<Z, B> { private boolean hasAllowIndeterminate; private boolean valAllowIndeterminate; private boolean hasIndeterminate; private boolean valIndeterminate; private boolean hasSelected; private boolean valSelected; private boolean bound1AllowIndeterminate; private boolean bound2AllowIndeterminate; private javafx.beans.value.ObservableValue<? extends Boolean> obsrv1AllowIndeterminate; private javafx.beans.property.Property<Boolean> obsrv2AllowIndeterminate; private boolean bound1Indeterminate; private boolean bound2Indeterminate; private javafx.beans.value.ObservableValue<? extends Boolean> obsrv1Indeterminate; private javafx.beans.property.Property<Boolean> obsrv2Indeterminate; private boolean bound1Selected; private boolean bound2Selected; private javafx.beans.value.ObservableValue<? extends Boolean> obsrv1Selected; private javafx.beans.property.Property<Boolean> obsrv2Selected; @Override public void applyTo(Z instance) { super.applyTo(instance); if (this.hasAllowIndeterminate) instance.setAllowIndeterminate(this.valAllowIndeterminate); if (this.hasIndeterminate) instance.setIndeterminate(this.valIndeterminate); if (this.hasSelected) instance.setSelected(this.valSelected); if (this.bound1AllowIndeterminate) instance.allowIndeterminateProperty().bind(this.obsrv1AllowIndeterminate); if (this.bound2AllowIndeterminate) instance.allowIndeterminateProperty().bindBidirectional(this.obsrv2AllowIndeterminate); if (this.bound1Indeterminate) instance.indeterminateProperty().bind(this.obsrv1Indeterminate); if (this.bound2Indeterminate) instance.indeterminateProperty().bindBidirectional(this.obsrv2Indeterminate); if (this.bound1Selected) instance.selectedProperty().bind(this.obsrv1Selected); if (this.bound2Selected) instance.selectedProperty().bindBidirectional(this.obsrv2Selected); } /** * 設定屬性{@link CheckBox#setAllowIndeterminate(boolean)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B allowIndeterminate(boolean value) { this.hasAllowIndeterminate = true; this.valAllowIndeterminate = value; return (B) this; } /** * 設定屬性{@link CheckBox#setIndeterminate(boolean)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B indeterminate(boolean value) { this.hasIndeterminate = true; this.valIndeterminate = value; return (B) this; } /** * 設定屬性{@link CheckBox#setSelected(boolean)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B selected(boolean value) { this.hasSelected = true; this.valSelected = value; return (B) this; } /** * 設定屬性{@link CheckBox#allowIndeterminateProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindAllowIndeterminate(javafx.beans.value.ObservableValue<? extends Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1AllowIndeterminate = true; this.obsrv1AllowIndeterminate = source; this.bound2AllowIndeterminate = false; this.obsrv2AllowIndeterminate = null; return (B) this; } /** * 設定屬性{@link CheckBox#allowIndeterminateProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalAllowIndeterminate(javafx.beans.property.Property<Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1AllowIndeterminate = false; this.obsrv1AllowIndeterminate = null; this.bound2AllowIndeterminate = true; this.obsrv2AllowIndeterminate = source; return (B) this; } /** * 設定屬性{@link CheckBox#indeterminateProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindIndeterminate(javafx.beans.value.ObservableValue<? extends Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1Indeterminate = true; this.obsrv1Indeterminate = source; this.bound2Indeterminate = false; this.obsrv2Indeterminate = null; return (B) this; } /** * 設定屬性{@link CheckBox#indeterminateProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalIndeterminate(javafx.beans.property.Property<Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1Indeterminate = false; this.obsrv1Indeterminate = null; this.bound2Indeterminate = true; this.obsrv2Indeterminate = source; return (B) this; } /** * 設定屬性{@link CheckBox#selectedProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindSelected(javafx.beans.value.ObservableValue<? extends Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1Selected = true; this.obsrv1Selected = source; this.bound2Selected = false; this.obsrv2Selected = null; return (B) this; } /** * 設定屬性{@link CheckBox#selectedProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalSelected(javafx.beans.property.Property<Boolean> source) { java.util.Objects.requireNonNull(source); this.bound1Selected = false; this.obsrv1Selected = null; this.bound2Selected = true; this.obsrv2Selected = source; return (B) this; } /** * 建構{@link CheckBox}物件。 * * @return 新的{@link CheckBox}物件實體 */ @Override @SuppressWarnings("unchecked") public CheckBox build() { CheckBox instance = new CheckBox(); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link CheckBox}物件。 * * @return 新的{@link CheckBox}物件實體 */ @SuppressWarnings("unchecked") public CheckBox build(java.lang.String arg0) { CheckBox instance = new CheckBox(arg0); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } }