// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package javafx.scene.control;
/**
* {@link TreeCell}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version jfxrt.jar
* @param <Z> 要建構的物件型態(需繼承{@link TreeCell})
* @param <B> 建構器本身的型態(需繼承{@link TreeCellMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class TreeCellMaker<T extends java.lang.Object, Z extends TreeCell<T>, B extends TreeCellMaker<T, Z, B>>
extends javafx.scene.control.IndexedCellMaker<T, Z, B>
implements TreeCellMakerExt<T, Z, B>
{
private boolean hasDisclosureNode;
private javafx.scene.Node valDisclosureNode;
private boolean bound1DisclosureNode;
private boolean bound2DisclosureNode;
private javafx.beans.value.ObservableValue<? extends javafx.scene.Node> obsrv1DisclosureNode;
private javafx.beans.property.Property<javafx.scene.Node> obsrv2DisclosureNode;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasDisclosureNode)
instance.setDisclosureNode(this.valDisclosureNode);
if (this.bound1DisclosureNode)
instance.disclosureNodeProperty().bind(this.obsrv1DisclosureNode);
if (this.bound2DisclosureNode)
instance.disclosureNodeProperty().bindBidirectional(this.obsrv2DisclosureNode);
}
/**
* 設定屬性{@link TreeCell#setDisclosureNode(javafx.scene.Node)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B disclosureNode(javafx.scene.Node value)
{
this.hasDisclosureNode = true;
this.valDisclosureNode = value;
return (B) this;
}
/**
* 設定屬性{@link TreeCell#disclosureNodeProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindDisclosureNode(javafx.beans.value.ObservableValue<? extends javafx.scene.Node> source)
{
java.util.Objects.requireNonNull(source);
this.bound1DisclosureNode = true;
this.obsrv1DisclosureNode = source;
this.bound2DisclosureNode = false;
this.obsrv2DisclosureNode = null;
return (B) this;
}
/**
* 設定屬性{@link TreeCell#disclosureNodeProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalDisclosureNode(javafx.beans.property.Property<javafx.scene.Node> source)
{
java.util.Objects.requireNonNull(source);
this.bound1DisclosureNode = false;
this.obsrv1DisclosureNode = null;
this.bound2DisclosureNode = true;
this.obsrv2DisclosureNode = source;
return (B) this;
}
/**
* 建構{@link TreeCell}物件。
*
* @return 新的{@link TreeCell}物件實體
*/
@Override
@SuppressWarnings("unchecked")
public TreeCell<T> build()
{
TreeCell<T> instance = new TreeCell<T>();
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
}