// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package javafx.scene.effect;
/**
* {@link Light}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version jfxrt.jar
* @param <Z> 要建構的物件型態(需繼承{@link Light})
* @param <B> 建構器本身的型態(需繼承{@link LightMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class LightMaker<Z extends Light, B extends LightMaker<Z, B>>
extends jxtn.jfx.makers.AbstractMaker<Z, B>
implements LightMakerExt<Z, B>
{
private boolean hasColor;
private javafx.scene.paint.Color valColor;
private boolean bound1Color;
private boolean bound2Color;
private javafx.beans.value.ObservableValue<? extends javafx.scene.paint.Color> obsrv1Color;
private javafx.beans.property.Property<javafx.scene.paint.Color> obsrv2Color;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasColor)
instance.setColor(this.valColor);
if (this.bound1Color)
instance.colorProperty().bind(this.obsrv1Color);
if (this.bound2Color)
instance.colorProperty().bindBidirectional(this.obsrv2Color);
}
/**
* 設定屬性{@link Light#setColor(javafx.scene.paint.Color)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B color(javafx.scene.paint.Color value)
{
this.hasColor = true;
this.valColor = value;
return (B) this;
}
/**
* 設定屬性{@link Light#colorProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindColor(javafx.beans.value.ObservableValue<? extends javafx.scene.paint.Color> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Color = true;
this.obsrv1Color = source;
this.bound2Color = false;
this.obsrv2Color = null;
return (B) this;
}
/**
* 設定屬性{@link Light#colorProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalColor(javafx.beans.property.Property<javafx.scene.paint.Color> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Color = false;
this.obsrv1Color = null;
this.bound2Color = true;
this.obsrv2Color = source;
return (B) this;
}
}