// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene.chart; /** * {@link PieChart.Data}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link PieChart.Data}) * @param <B> 建構器本身的型態(需繼承{@link PieChart.DataMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class PieChart_DataMaker<Z extends PieChart.Data, B extends PieChart_DataMaker<Z, B>> extends jxtn.jfx.makers.AbstractMaker<Z, B> implements PieChart_DataMakerExt<Z, B> { private boolean hasName; private java.lang.String valName; private boolean hasPieValue; private double valPieValue; private boolean bound1Name; private boolean bound2Name; private javafx.beans.value.ObservableValue<? extends String> obsrv1Name; private javafx.beans.property.Property<String> obsrv2Name; private boolean bound1PieValue; private boolean bound2PieValue; private javafx.beans.value.ObservableValue<? extends Number> obsrv1PieValue; private javafx.beans.property.Property<Number> obsrv2PieValue; @Override public void applyTo(Z instance) { super.applyTo(instance); if (this.hasName) instance.setName(this.valName); if (this.hasPieValue) instance.setPieValue(this.valPieValue); if (this.bound1Name) instance.nameProperty().bind(this.obsrv1Name); if (this.bound2Name) instance.nameProperty().bindBidirectional(this.obsrv2Name); if (this.bound1PieValue) instance.pieValueProperty().bind(this.obsrv1PieValue); if (this.bound2PieValue) instance.pieValueProperty().bindBidirectional(this.obsrv2PieValue); } /** * 設定屬性{@link PieChart.Data#setName(java.lang.String)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B name(java.lang.String value) { this.hasName = true; this.valName = value; return (B) this; } /** * 設定屬性{@link PieChart.Data#setPieValue(double)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B pieValue(double value) { this.hasPieValue = true; this.valPieValue = value; return (B) this; } /** * 設定屬性{@link PieChart.Data#nameProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindName(javafx.beans.value.ObservableValue<? extends String> source) { java.util.Objects.requireNonNull(source); this.bound1Name = true; this.obsrv1Name = source; this.bound2Name = false; this.obsrv2Name = null; return (B) this; } /** * 設定屬性{@link PieChart.Data#nameProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalName(javafx.beans.property.Property<String> source) { java.util.Objects.requireNonNull(source); this.bound1Name = false; this.obsrv1Name = null; this.bound2Name = true; this.obsrv2Name = source; return (B) this; } /** * 設定屬性{@link PieChart.Data#pieValueProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindPieValue(javafx.beans.value.ObservableValue<? extends Number> source) { java.util.Objects.requireNonNull(source); this.bound1PieValue = true; this.obsrv1PieValue = source; this.bound2PieValue = false; this.obsrv2PieValue = null; return (B) this; } /** * 設定屬性{@link PieChart.Data#pieValueProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalPieValue(javafx.beans.property.Property<Number> source) { java.util.Objects.requireNonNull(source); this.bound1PieValue = false; this.obsrv1PieValue = null; this.bound2PieValue = true; this.obsrv2PieValue = source; return (B) this; } /** * 建構{@link PieChart.Data}物件。 * * @return 新的{@link PieChart.Data}物件實體 */ @SuppressWarnings("unchecked") public PieChart.Data build(java.lang.String arg0, double arg1) { PieChart.Data instance = new PieChart.Data(arg0, arg1); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } }