// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package javafx.scene.control;
/**
* {@link CustomMenuItem}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version jfxrt.jar
* @param <Z> 要建構的物件型態(需繼承{@link CustomMenuItem})
* @param <B> 建構器本身的型態(需繼承{@link CustomMenuItemMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class CustomMenuItemMaker<Z extends CustomMenuItem, B extends CustomMenuItemMaker<Z, B>>
extends javafx.scene.control.MenuItemMaker<Z, B>
implements CustomMenuItemMakerExt<Z, B>
{
private boolean hasContent;
private javafx.scene.Node valContent;
private boolean hasHideOnClick;
private boolean valHideOnClick;
private boolean bound1Content;
private boolean bound2Content;
private javafx.beans.value.ObservableValue<? extends javafx.scene.Node> obsrv1Content;
private javafx.beans.property.Property<javafx.scene.Node> obsrv2Content;
private boolean bound1HideOnClick;
private boolean bound2HideOnClick;
private javafx.beans.value.ObservableValue<? extends Boolean> obsrv1HideOnClick;
private javafx.beans.property.Property<Boolean> obsrv2HideOnClick;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasContent)
instance.setContent(this.valContent);
if (this.hasHideOnClick)
instance.setHideOnClick(this.valHideOnClick);
if (this.bound1Content)
instance.contentProperty().bind(this.obsrv1Content);
if (this.bound2Content)
instance.contentProperty().bindBidirectional(this.obsrv2Content);
if (this.bound1HideOnClick)
instance.hideOnClickProperty().bind(this.obsrv1HideOnClick);
if (this.bound2HideOnClick)
instance.hideOnClickProperty().bindBidirectional(this.obsrv2HideOnClick);
}
/**
* 設定屬性{@link CustomMenuItem#setContent(javafx.scene.Node)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B content(javafx.scene.Node value)
{
this.hasContent = true;
this.valContent = value;
return (B) this;
}
/**
* 設定屬性{@link CustomMenuItem#setHideOnClick(boolean)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B hideOnClick(boolean value)
{
this.hasHideOnClick = true;
this.valHideOnClick = value;
return (B) this;
}
/**
* 設定屬性{@link CustomMenuItem#contentProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindContent(javafx.beans.value.ObservableValue<? extends javafx.scene.Node> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Content = true;
this.obsrv1Content = source;
this.bound2Content = false;
this.obsrv2Content = null;
return (B) this;
}
/**
* 設定屬性{@link CustomMenuItem#contentProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalContent(javafx.beans.property.Property<javafx.scene.Node> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Content = false;
this.obsrv1Content = null;
this.bound2Content = true;
this.obsrv2Content = source;
return (B) this;
}
/**
* 設定屬性{@link CustomMenuItem#hideOnClickProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindHideOnClick(javafx.beans.value.ObservableValue<? extends Boolean> source)
{
java.util.Objects.requireNonNull(source);
this.bound1HideOnClick = true;
this.obsrv1HideOnClick = source;
this.bound2HideOnClick = false;
this.obsrv2HideOnClick = null;
return (B) this;
}
/**
* 設定屬性{@link CustomMenuItem#hideOnClickProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalHideOnClick(javafx.beans.property.Property<Boolean> source)
{
java.util.Objects.requireNonNull(source);
this.bound1HideOnClick = false;
this.obsrv1HideOnClick = null;
this.bound2HideOnClick = true;
this.obsrv2HideOnClick = source;
return (B) this;
}
/**
* 建構{@link CustomMenuItem}物件。
*
* @return 新的{@link CustomMenuItem}物件實體
*/
@Override
@SuppressWarnings("unchecked")
public CustomMenuItem build()
{
CustomMenuItem instance = new CustomMenuItem();
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
/**
* 建構{@link CustomMenuItem}物件。
*
* @return 新的{@link CustomMenuItem}物件實體
*/
@SuppressWarnings("unchecked")
public CustomMenuItem build(javafx.scene.Node arg0)
{
CustomMenuItem instance = new CustomMenuItem(arg0);
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
/**
* 建構{@link CustomMenuItem}物件。
*
* @return 新的{@link CustomMenuItem}物件實體
*/
@SuppressWarnings("unchecked")
public CustomMenuItem build(javafx.scene.Node arg0, boolean arg1)
{
CustomMenuItem instance = new CustomMenuItem(arg0, arg1);
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
}