// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package javafx.scene.shape;
/**
* {@link HLineTo}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version jfxrt.jar
* @param <Z> 要建構的物件型態(需繼承{@link HLineTo})
* @param <B> 建構器本身的型態(需繼承{@link HLineToMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class HLineToMaker<Z extends HLineTo, B extends HLineToMaker<Z, B>>
extends javafx.scene.shape.PathElementMaker<Z, B>
implements HLineToMakerExt<Z, B>
{
private boolean hasX;
private double valX;
private boolean bound1X;
private boolean bound2X;
private javafx.beans.value.ObservableValue<? extends Number> obsrv1X;
private javafx.beans.property.Property<Number> obsrv2X;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasX)
instance.setX(this.valX);
if (this.bound1X)
instance.xProperty().bind(this.obsrv1X);
if (this.bound2X)
instance.xProperty().bindBidirectional(this.obsrv2X);
}
/**
* 設定屬性{@link HLineTo#setX(double)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B x(double value)
{
this.hasX = true;
this.valX = value;
return (B) this;
}
/**
* 設定屬性{@link HLineTo#xProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindX(javafx.beans.value.ObservableValue<? extends Number> source)
{
java.util.Objects.requireNonNull(source);
this.bound1X = true;
this.obsrv1X = source;
this.bound2X = false;
this.obsrv2X = null;
return (B) this;
}
/**
* 設定屬性{@link HLineTo#xProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalX(javafx.beans.property.Property<Number> source)
{
java.util.Objects.requireNonNull(source);
this.bound1X = false;
this.obsrv1X = null;
this.bound2X = true;
this.obsrv2X = source;
return (B) this;
}
/**
* 建構{@link HLineTo}物件。
*
* @return 新的{@link HLineTo}物件實體
*/
@Override
@SuppressWarnings("unchecked")
public HLineTo build()
{
HLineTo instance = new HLineTo();
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
/**
* 建構{@link HLineTo}物件。
*
* @return 新的{@link HLineTo}物件實體
*/
@SuppressWarnings("unchecked")
public HLineTo build(double arg0)
{
HLineTo instance = new HLineTo(arg0);
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
}