// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package javafx.scene.control;
/**
* {@link DatePicker}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version jfxrt.jar
* @param <Z> 要建構的物件型態(需繼承{@link DatePicker})
* @param <B> 建構器本身的型態(需繼承{@link DatePickerMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class DatePickerMaker<Z extends DatePicker, B extends DatePickerMaker<Z, B>>
extends javafx.scene.control.ComboBoxBaseMaker<java.time.LocalDate, Z, B>
implements DatePickerMakerExt<Z, B>
{
private boolean hasChronology;
private java.time.chrono.Chronology valChronology;
private boolean hasConverter;
private javafx.util.StringConverter<java.time.LocalDate> valConverter;
private boolean hasDayCellFactory;
private javafx.util.Callback<javafx.scene.control.DatePicker, javafx.scene.control.DateCell> valDayCellFactory;
private boolean hasShowWeekNumbers;
private boolean valShowWeekNumbers;
private boolean bound1Chronology;
private boolean bound2Chronology;
private javafx.beans.value.ObservableValue<? extends java.time.chrono.Chronology> obsrv1Chronology;
private javafx.beans.property.Property<java.time.chrono.Chronology> obsrv2Chronology;
private boolean bound1Converter;
private boolean bound2Converter;
private javafx.beans.value.ObservableValue<? extends javafx.util.StringConverter<java.time.LocalDate>> obsrv1Converter;
private javafx.beans.property.Property<javafx.util.StringConverter<java.time.LocalDate>> obsrv2Converter;
private boolean bound1DayCellFactory;
private boolean bound2DayCellFactory;
private javafx.beans.value.ObservableValue<? extends javafx.util.Callback<javafx.scene.control.DatePicker, javafx.scene.control.DateCell>> obsrv1DayCellFactory;
private javafx.beans.property.Property<javafx.util.Callback<javafx.scene.control.DatePicker, javafx.scene.control.DateCell>> obsrv2DayCellFactory;
private boolean bound1ShowWeekNumbers;
private boolean bound2ShowWeekNumbers;
private javafx.beans.value.ObservableValue<? extends Boolean> obsrv1ShowWeekNumbers;
private javafx.beans.property.Property<Boolean> obsrv2ShowWeekNumbers;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasChronology)
instance.setChronology(this.valChronology);
if (this.hasConverter)
instance.setConverter(this.valConverter);
if (this.hasDayCellFactory)
instance.setDayCellFactory(this.valDayCellFactory);
if (this.hasShowWeekNumbers)
instance.setShowWeekNumbers(this.valShowWeekNumbers);
if (this.bound1Chronology)
instance.chronologyProperty().bind(this.obsrv1Chronology);
if (this.bound2Chronology)
instance.chronologyProperty().bindBidirectional(this.obsrv2Chronology);
if (this.bound1Converter)
instance.converterProperty().bind(this.obsrv1Converter);
if (this.bound2Converter)
instance.converterProperty().bindBidirectional(this.obsrv2Converter);
if (this.bound1DayCellFactory)
instance.dayCellFactoryProperty().bind(this.obsrv1DayCellFactory);
if (this.bound2DayCellFactory)
instance.dayCellFactoryProperty().bindBidirectional(this.obsrv2DayCellFactory);
if (this.bound1ShowWeekNumbers)
instance.showWeekNumbersProperty().bind(this.obsrv1ShowWeekNumbers);
if (this.bound2ShowWeekNumbers)
instance.showWeekNumbersProperty().bindBidirectional(this.obsrv2ShowWeekNumbers);
}
/**
* 設定屬性{@link DatePicker#setChronology(java.time.chrono.Chronology)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B chronology(java.time.chrono.Chronology value)
{
this.hasChronology = true;
this.valChronology = value;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#setConverter(javafx.util.StringConverter)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B converter(javafx.util.StringConverter<java.time.LocalDate> value)
{
this.hasConverter = true;
this.valConverter = value;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#setDayCellFactory(javafx.util.Callback)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B dayCellFactory(javafx.util.Callback<javafx.scene.control.DatePicker, javafx.scene.control.DateCell> value)
{
this.hasDayCellFactory = true;
this.valDayCellFactory = value;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#setShowWeekNumbers(boolean)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B showWeekNumbers(boolean value)
{
this.hasShowWeekNumbers = true;
this.valShowWeekNumbers = value;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#chronologyProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindChronology(javafx.beans.value.ObservableValue<? extends java.time.chrono.Chronology> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Chronology = true;
this.obsrv1Chronology = source;
this.bound2Chronology = false;
this.obsrv2Chronology = null;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#chronologyProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalChronology(javafx.beans.property.Property<java.time.chrono.Chronology> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Chronology = false;
this.obsrv1Chronology = null;
this.bound2Chronology = true;
this.obsrv2Chronology = source;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#converterProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindConverter(javafx.beans.value.ObservableValue<? extends javafx.util.StringConverter<java.time.LocalDate>> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Converter = true;
this.obsrv1Converter = source;
this.bound2Converter = false;
this.obsrv2Converter = null;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#converterProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalConverter(javafx.beans.property.Property<javafx.util.StringConverter<java.time.LocalDate>> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Converter = false;
this.obsrv1Converter = null;
this.bound2Converter = true;
this.obsrv2Converter = source;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#dayCellFactoryProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindDayCellFactory(javafx.beans.value.ObservableValue<? extends javafx.util.Callback<javafx.scene.control.DatePicker, javafx.scene.control.DateCell>> source)
{
java.util.Objects.requireNonNull(source);
this.bound1DayCellFactory = true;
this.obsrv1DayCellFactory = source;
this.bound2DayCellFactory = false;
this.obsrv2DayCellFactory = null;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#dayCellFactoryProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalDayCellFactory(javafx.beans.property.Property<javafx.util.Callback<javafx.scene.control.DatePicker, javafx.scene.control.DateCell>> source)
{
java.util.Objects.requireNonNull(source);
this.bound1DayCellFactory = false;
this.obsrv1DayCellFactory = null;
this.bound2DayCellFactory = true;
this.obsrv2DayCellFactory = source;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#showWeekNumbersProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindShowWeekNumbers(javafx.beans.value.ObservableValue<? extends Boolean> source)
{
java.util.Objects.requireNonNull(source);
this.bound1ShowWeekNumbers = true;
this.obsrv1ShowWeekNumbers = source;
this.bound2ShowWeekNumbers = false;
this.obsrv2ShowWeekNumbers = null;
return (B) this;
}
/**
* 設定屬性{@link DatePicker#showWeekNumbersProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalShowWeekNumbers(javafx.beans.property.Property<Boolean> source)
{
java.util.Objects.requireNonNull(source);
this.bound1ShowWeekNumbers = false;
this.obsrv1ShowWeekNumbers = null;
this.bound2ShowWeekNumbers = true;
this.obsrv2ShowWeekNumbers = source;
return (B) this;
}
/**
* 建構{@link DatePicker}物件。
*
* @return 新的{@link DatePicker}物件實體
*/
@Override
@SuppressWarnings("unchecked")
public DatePicker build()
{
DatePicker instance = new DatePicker();
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
/**
* 建構{@link DatePicker}物件。
*
* @return 新的{@link DatePicker}物件實體
*/
@SuppressWarnings("unchecked")
public DatePicker build(java.time.LocalDate arg0)
{
DatePicker instance = new DatePicker(arg0);
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
}