// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene.shape; /** * {@link Cylinder}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link Cylinder}) * @param <B> 建構器本身的型態(需繼承{@link CylinderMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class CylinderMaker<Z extends Cylinder, B extends CylinderMaker<Z, B>> extends javafx.scene.shape.Shape3DMaker<Z, B> implements CylinderMakerExt<Z, B> { private boolean hasHeight; private double valHeight; private boolean hasRadius; private double valRadius; private boolean bound1Height; private boolean bound2Height; private javafx.beans.value.ObservableValue<? extends Number> obsrv1Height; private javafx.beans.property.Property<Number> obsrv2Height; private boolean bound1Radius; private boolean bound2Radius; private javafx.beans.value.ObservableValue<? extends Number> obsrv1Radius; private javafx.beans.property.Property<Number> obsrv2Radius; @Override public void applyTo(Z instance) { super.applyTo(instance); if (this.hasHeight) instance.setHeight(this.valHeight); if (this.hasRadius) instance.setRadius(this.valRadius); if (this.bound1Height) instance.heightProperty().bind(this.obsrv1Height); if (this.bound2Height) instance.heightProperty().bindBidirectional(this.obsrv2Height); if (this.bound1Radius) instance.radiusProperty().bind(this.obsrv1Radius); if (this.bound2Radius) instance.radiusProperty().bindBidirectional(this.obsrv2Radius); } /** * 設定屬性{@link Cylinder#setHeight(double)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B height(double value) { this.hasHeight = true; this.valHeight = value; return (B) this; } /** * 設定屬性{@link Cylinder#setRadius(double)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B radius(double value) { this.hasRadius = true; this.valRadius = value; return (B) this; } /** * 設定屬性{@link Cylinder#heightProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindHeight(javafx.beans.value.ObservableValue<? extends Number> source) { java.util.Objects.requireNonNull(source); this.bound1Height = true; this.obsrv1Height = source; this.bound2Height = false; this.obsrv2Height = null; return (B) this; } /** * 設定屬性{@link Cylinder#heightProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalHeight(javafx.beans.property.Property<Number> source) { java.util.Objects.requireNonNull(source); this.bound1Height = false; this.obsrv1Height = null; this.bound2Height = true; this.obsrv2Height = source; return (B) this; } /** * 設定屬性{@link Cylinder#radiusProperty}的連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindRadius(javafx.beans.value.ObservableValue<? extends Number> source) { java.util.Objects.requireNonNull(source); this.bound1Radius = true; this.obsrv1Radius = source; this.bound2Radius = false; this.obsrv2Radius = null; return (B) this; } /** * 設定屬性{@link Cylinder#radiusProperty}的雙向連結。 * * @param value 新的屬性連結(單向) * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B bindBidirectionalRadius(javafx.beans.property.Property<Number> source) { java.util.Objects.requireNonNull(source); this.bound1Radius = false; this.obsrv1Radius = null; this.bound2Radius = true; this.obsrv2Radius = source; return (B) this; } /** * 建構{@link Cylinder}物件。 * * @return 新的{@link Cylinder}物件實體 */ @Override @SuppressWarnings("unchecked") public Cylinder build() { Cylinder instance = new Cylinder(); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link Cylinder}物件。 * * @return 新的{@link Cylinder}物件實體 */ @SuppressWarnings("unchecked") public Cylinder build(double arg0, double arg1) { Cylinder instance = new Cylinder(arg0, arg1); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link Cylinder}物件。 * * @return 新的{@link Cylinder}物件實體 */ @SuppressWarnings("unchecked") public Cylinder build(double arg0, double arg1, int arg2) { Cylinder instance = new Cylinder(arg0, arg1, arg2); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } }