// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package org.controlsfx.control;
/**
* {@link PlusMinusSlider}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version controlsfx-8.40.12.jar
* @param <Z> 要建構的物件型態(需繼承{@link PlusMinusSlider})
* @param <B> 建構器本身的型態(需繼承{@link PlusMinusSliderMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class PlusMinusSliderMaker<Z extends PlusMinusSlider, B extends PlusMinusSliderMaker<Z, B>>
extends javafx.scene.control.ControlMaker<Z, B>
implements PlusMinusSliderMakerExt<Z, B>
{
private boolean hasOnValueChanged;
private javafx.event.EventHandler<org.controlsfx.control.PlusMinusSlider.PlusMinusEvent> valOnValueChanged;
private boolean hasOrientation;
private javafx.geometry.Orientation valOrientation;
private boolean bound1OnValueChanged;
private boolean bound2OnValueChanged;
private javafx.beans.value.ObservableValue<? extends javafx.event.EventHandler<org.controlsfx.control.PlusMinusSlider.PlusMinusEvent>> obsrv1OnValueChanged;
private javafx.beans.property.Property<javafx.event.EventHandler<org.controlsfx.control.PlusMinusSlider.PlusMinusEvent>> obsrv2OnValueChanged;
private boolean bound1Orientation;
private boolean bound2Orientation;
private javafx.beans.value.ObservableValue<? extends javafx.geometry.Orientation> obsrv1Orientation;
private javafx.beans.property.Property<javafx.geometry.Orientation> obsrv2Orientation;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasOnValueChanged)
instance.setOnValueChanged(this.valOnValueChanged);
if (this.hasOrientation)
instance.setOrientation(this.valOrientation);
if (this.bound1OnValueChanged)
instance.onValueChangedProperty().bind(this.obsrv1OnValueChanged);
if (this.bound2OnValueChanged)
instance.onValueChangedProperty().bindBidirectional(this.obsrv2OnValueChanged);
if (this.bound1Orientation)
instance.orientationProperty().bind(this.obsrv1Orientation);
if (this.bound2Orientation)
instance.orientationProperty().bindBidirectional(this.obsrv2Orientation);
}
/**
* 設定屬性{@link PlusMinusSlider#setOnValueChanged(javafx.event.EventHandler)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B onValueChanged(javafx.event.EventHandler<org.controlsfx.control.PlusMinusSlider.PlusMinusEvent> value)
{
this.hasOnValueChanged = true;
this.valOnValueChanged = value;
return (B) this;
}
/**
* 設定屬性{@link PlusMinusSlider#setOrientation(javafx.geometry.Orientation)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B orientation(javafx.geometry.Orientation value)
{
this.hasOrientation = true;
this.valOrientation = value;
return (B) this;
}
/**
* 設定屬性{@link PlusMinusSlider#onValueChangedProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindOnValueChanged(javafx.beans.value.ObservableValue<? extends javafx.event.EventHandler<org.controlsfx.control.PlusMinusSlider.PlusMinusEvent>> source)
{
java.util.Objects.requireNonNull(source);
this.bound1OnValueChanged = true;
this.obsrv1OnValueChanged = source;
this.bound2OnValueChanged = false;
this.obsrv2OnValueChanged = null;
return (B) this;
}
/**
* 設定屬性{@link PlusMinusSlider#onValueChangedProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalOnValueChanged(javafx.beans.property.Property<javafx.event.EventHandler<org.controlsfx.control.PlusMinusSlider.PlusMinusEvent>> source)
{
java.util.Objects.requireNonNull(source);
this.bound1OnValueChanged = false;
this.obsrv1OnValueChanged = null;
this.bound2OnValueChanged = true;
this.obsrv2OnValueChanged = source;
return (B) this;
}
/**
* 設定屬性{@link PlusMinusSlider#orientationProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindOrientation(javafx.beans.value.ObservableValue<? extends javafx.geometry.Orientation> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Orientation = true;
this.obsrv1Orientation = source;
this.bound2Orientation = false;
this.obsrv2Orientation = null;
return (B) this;
}
/**
* 設定屬性{@link PlusMinusSlider#orientationProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalOrientation(javafx.beans.property.Property<javafx.geometry.Orientation> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Orientation = false;
this.obsrv1Orientation = null;
this.bound2Orientation = true;
this.obsrv2Orientation = source;
return (B) this;
}
/**
* 建構{@link PlusMinusSlider}物件。
*
* @return 新的{@link PlusMinusSlider}物件實體
*/
@Override
@SuppressWarnings("unchecked")
public PlusMinusSlider build()
{
PlusMinusSlider instance = new PlusMinusSlider();
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
}