// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene.shape; /** * {@link Sphere}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link Sphere}) * @param <B> 建構器本身的型態(需繼承{@link SphereMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class SphereMaker<Z extends Sphere, B extends SphereMaker<Z, B>> extends javafx.scene.shape.Shape3DMaker<Z, B> implements SphereMakerExt<Z, B> { private boolean hasRadius; private double valRadius; 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.hasRadius) instance.setRadius(this.valRadius); if (this.bound1Radius) instance.radiusProperty().bind(this.obsrv1Radius); if (this.bound2Radius) instance.radiusProperty().bindBidirectional(this.obsrv2Radius); } /** * 設定屬性{@link Sphere#setRadius(double)}。 * * @param value 新的屬性值 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public B radius(double value) { this.hasRadius = true; this.valRadius = value; return (B) this; } /** * 設定屬性{@link Sphere#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 Sphere#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 Sphere}物件。 * * @return 新的{@link Sphere}物件實體 */ @Override @SuppressWarnings("unchecked") public Sphere build() { Sphere instance = new Sphere(); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link Sphere}物件。 * * @return 新的{@link Sphere}物件實體 */ @SuppressWarnings("unchecked") public Sphere build(double arg0) { Sphere instance = new Sphere(arg0); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } /** * 建構{@link Sphere}物件。 * * @return 新的{@link Sphere}物件實體 */ @SuppressWarnings("unchecked") public Sphere build(double arg0, int arg1) { Sphere instance = new Sphere(arg0, arg1); this.applyTo((Z) instance); this.doAfterBuild((Z) instance); return instance; } }