// @formatter:off /* * Unlicensed, generated by javafx.ftl */ package javafx.scene; /** * {@link Parent}建構器。 * * @author JarReflectionDataLoader-1.0.0 * @version jfxrt.jar * @param <Z> 要建構的物件型態(需繼承{@link Parent}) * @param <B> 建構器本身的型態(需繼承{@link ParentMaker}) */ @javax.annotation.Generated("Generated by javafx.ftl") @SuppressWarnings("all") public class ParentMaker<Z extends Parent, B extends ParentMaker<Z, B>> extends javafx.scene.NodeMaker<Z, B> implements ParentMakerExt<Z, B> { private boolean hasChildrenUnmodifiable; private java.util.Collection<javafx.scene.Node> valChildrenUnmodifiable; private boolean hasStylesheets; private java.util.Collection<java.lang.String> valStylesheets; @Override public void applyTo(Z instance) { super.applyTo(instance); if (this.hasChildrenUnmodifiable) instance.getChildrenUnmodifiable().addAll(this.valChildrenUnmodifiable); if (this.hasStylesheets) instance.getStylesheets().addAll(this.valStylesheets); } /** * 設定集合屬性{@link Parent#getChildrenUnmodifiable}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) * @deprecated 屬性值並非{@link javafx.collections.ObservableList} */ @Deprecated @SuppressWarnings("unchecked") public final B childrenUnmodifiable(java.util.Collection<? extends javafx.scene.Node> value) { this.hasChildrenUnmodifiable = true; this.valChildrenUnmodifiable = (java.util.Collection<javafx.scene.Node>) value; return (B) this; } /** * 設定集合屬性{@link Parent#getChildrenUnmodifiable}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SafeVarargs @SuppressWarnings("unchecked") public final B childrenUnmodifiable(javafx.scene.Node... value) { this.hasChildrenUnmodifiable = true; this.valChildrenUnmodifiable = java.util.Arrays.asList(value); return (B) this; } /** * 增加集合屬性{@link Parent#getChildrenUnmodifiable}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B childrenUnmodifiableAdd(java.util.Collection<? extends javafx.scene.Node> value) { java.util.Objects.requireNonNull(value); this.hasChildrenUnmodifiable = true; if (this.valChildrenUnmodifiable == null) this.valChildrenUnmodifiable = new java.util.ArrayList<>(value.size()); this.valChildrenUnmodifiable.addAll(value); return (B) this; } /** * 增加集合屬性{@link Parent#getChildrenUnmodifiable}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SafeVarargs @SuppressWarnings("unchecked") public final B childrenUnmodifiableAdd(javafx.scene.Node... value) { java.util.Objects.requireNonNull(value); this.hasChildrenUnmodifiable = true; if (this.valChildrenUnmodifiable == null) this.valChildrenUnmodifiable = new java.util.ArrayList<>(value.length); this.valChildrenUnmodifiable.addAll(java.util.Arrays.asList(value)); return (B) this; } /** * 增加集合屬性{@link Parent#getChildrenUnmodifiable}的內容,排除null項目。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B childrenUnmodifiableAddNonNull(java.util.Collection<? extends javafx.scene.Node> value) { java.util.Objects.requireNonNull(value); this.hasChildrenUnmodifiable = true; if (this.valChildrenUnmodifiable == null) this.valChildrenUnmodifiable = new java.util.ArrayList<>(value.size()); for (javafx.scene.Node i : value) if (i != null) this.valChildrenUnmodifiable.add(i); return (B) this; } /** * 增加集合屬性{@link Parent#getChildrenUnmodifiable}的內容,排除null項目。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SafeVarargs @SuppressWarnings("unchecked") public final B childrenUnmodifiableAddNonNull(javafx.scene.Node... value) { java.util.Objects.requireNonNull(value); this.hasChildrenUnmodifiable = true; if (this.valChildrenUnmodifiable == null) this.valChildrenUnmodifiable = new java.util.ArrayList<>(value.length); for (javafx.scene.Node i : value) if (i != null) this.valChildrenUnmodifiable.add(i); return (B) this; } /** * 設定集合屬性{@link Parent#getStylesheets}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) * @deprecated 屬性值並非{@link javafx.collections.ObservableList} */ @Deprecated @SuppressWarnings("unchecked") public final B stylesheets(java.util.Collection<? extends java.lang.String> value) { this.hasStylesheets = true; this.valStylesheets = (java.util.Collection<java.lang.String>) value; return (B) this; } /** * 設定集合屬性{@link Parent#getStylesheets}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SafeVarargs @SuppressWarnings("unchecked") public final B stylesheets(java.lang.String... value) { this.hasStylesheets = true; this.valStylesheets = java.util.Arrays.asList(value); return (B) this; } /** * 增加集合屬性{@link Parent#getStylesheets}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B stylesheetsAdd(java.util.Collection<? extends java.lang.String> value) { java.util.Objects.requireNonNull(value); this.hasStylesheets = true; if (this.valStylesheets == null) this.valStylesheets = new java.util.ArrayList<>(value.size()); this.valStylesheets.addAll(value); return (B) this; } /** * 增加集合屬性{@link Parent#getStylesheets}的內容。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SafeVarargs @SuppressWarnings("unchecked") public final B stylesheetsAdd(java.lang.String... value) { java.util.Objects.requireNonNull(value); this.hasStylesheets = true; if (this.valStylesheets == null) this.valStylesheets = new java.util.ArrayList<>(value.length); this.valStylesheets.addAll(java.util.Arrays.asList(value)); return (B) this; } /** * 增加集合屬性{@link Parent#getStylesheets}的內容,排除null項目。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SuppressWarnings("unchecked") public final B stylesheetsAddNonNull(java.util.Collection<? extends java.lang.String> value) { java.util.Objects.requireNonNull(value); this.hasStylesheets = true; if (this.valStylesheets == null) this.valStylesheets = new java.util.ArrayList<>(value.size()); for (java.lang.String i : value) if (i != null) this.valStylesheets.add(i); return (B) this; } /** * 增加集合屬性{@link Parent#getStylesheets}的內容,排除null項目。 * * @param value 新的集合內容 * @return 目前的建構器(this) */ @SafeVarargs @SuppressWarnings("unchecked") public final B stylesheetsAddNonNull(java.lang.String... value) { java.util.Objects.requireNonNull(value); this.hasStylesheets = true; if (this.valStylesheets == null) this.valStylesheets = new java.util.ArrayList<>(value.length); for (java.lang.String i : value) if (i != null) this.valStylesheets.add(i); return (B) this; } }