// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package javafx.scene.control;
/**
* {@link SkinBase}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version jfxrt.jar
* @param <Z> 要建構的物件型態(需繼承{@link SkinBase})
* @param <B> 建構器本身的型態(需繼承{@link SkinBaseMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class SkinBaseMaker<C extends javafx.scene.control.Control, Z extends SkinBase<C>, B extends SkinBaseMaker<C, Z, B>>
extends jxtn.jfx.makers.AbstractMaker<Z, B>
implements SkinBaseMakerExt<C, Z, B>
{
private boolean hasChildren;
private java.util.Collection<javafx.scene.Node> valChildren;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasChildren)
instance.getChildren().addAll(this.valChildren);
}
/**
* 設定集合屬性{@link SkinBase#getChildren}的內容。
*
* @param value 新的集合內容
* @return 目前的建構器(this)
* @deprecated 屬性值並非{@link javafx.collections.ObservableList}
*/
@Deprecated
@SuppressWarnings("unchecked")
public final B children(java.util.Collection<? extends javafx.scene.Node> value)
{
this.hasChildren = true;
this.valChildren = (java.util.Collection<javafx.scene.Node>) value;
return (B) this;
}
/**
* 設定集合屬性{@link SkinBase#getChildren}的內容。
*
* @param value 新的集合內容
* @return 目前的建構器(this)
*/
@SafeVarargs
@SuppressWarnings("unchecked")
public final B children(javafx.scene.Node... value)
{
this.hasChildren = true;
this.valChildren = java.util.Arrays.asList(value);
return (B) this;
}
/**
* 增加集合屬性{@link SkinBase#getChildren}的內容。
*
* @param value 新的集合內容
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B childrenAdd(java.util.Collection<? extends javafx.scene.Node> value)
{
java.util.Objects.requireNonNull(value);
this.hasChildren = true;
if (this.valChildren == null)
this.valChildren = new java.util.ArrayList<>(value.size());
this.valChildren.addAll(value);
return (B) this;
}
/**
* 增加集合屬性{@link SkinBase#getChildren}的內容。
*
* @param value 新的集合內容
* @return 目前的建構器(this)
*/
@SafeVarargs
@SuppressWarnings("unchecked")
public final B childrenAdd(javafx.scene.Node... value)
{
java.util.Objects.requireNonNull(value);
this.hasChildren = true;
if (this.valChildren == null)
this.valChildren = new java.util.ArrayList<>(value.length);
this.valChildren.addAll(java.util.Arrays.asList(value));
return (B) this;
}
/**
* 增加集合屬性{@link SkinBase#getChildren}的內容,排除null項目。
*
* @param value 新的集合內容
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B childrenAddNonNull(java.util.Collection<? extends javafx.scene.Node> value)
{
java.util.Objects.requireNonNull(value);
this.hasChildren = true;
if (this.valChildren == null)
this.valChildren = new java.util.ArrayList<>(value.size());
for (javafx.scene.Node i : value)
if (i != null)
this.valChildren.add(i);
return (B) this;
}
/**
* 增加集合屬性{@link SkinBase#getChildren}的內容,排除null項目。
*
* @param value 新的集合內容
* @return 目前的建構器(this)
*/
@SafeVarargs
@SuppressWarnings("unchecked")
public final B childrenAddNonNull(javafx.scene.Node... value)
{
java.util.Objects.requireNonNull(value);
this.hasChildren = true;
if (this.valChildren == null)
this.valChildren = new java.util.ArrayList<>(value.length);
for (javafx.scene.Node i : value)
if (i != null)
this.valChildren.add(i);
return (B) this;
}
}