// @formatter:off
/*
* Unlicensed, generated by javafx.ftl
*/
package org.controlsfx.glyphfont;
/**
* {@link Glyph}建構器。
*
* @author JarReflectionDataLoader-1.0.0
* @version controlsfx-8.40.12.jar
* @param <Z> 要建構的物件型態(需繼承{@link Glyph})
* @param <B> 建構器本身的型態(需繼承{@link GlyphMaker})
*/
@javax.annotation.Generated("Generated by javafx.ftl")
@SuppressWarnings("all")
public class GlyphMaker<Z extends Glyph, B extends GlyphMaker<Z, B>>
extends javafx.scene.control.LabelMaker<Z, B>
implements GlyphMakerExt<Z, B>
{
private boolean hasColor;
private javafx.scene.paint.Color valColor;
private boolean hasFontFamily;
private java.lang.String valFontFamily;
private boolean hasFontSize;
private double valFontSize;
private boolean hasIcon;
private java.lang.Object valIcon;
private boolean bound1Icon;
private boolean bound2Icon;
private javafx.beans.value.ObservableValue<? extends java.lang.Object> obsrv1Icon;
private javafx.beans.property.Property<java.lang.Object> obsrv2Icon;
@Override
public void applyTo(Z instance)
{
super.applyTo(instance);
if (this.hasColor)
instance.setColor(this.valColor);
if (this.hasFontFamily)
instance.setFontFamily(this.valFontFamily);
if (this.hasFontSize)
instance.setFontSize(this.valFontSize);
if (this.hasIcon)
instance.setIcon(this.valIcon);
if (this.bound1Icon)
instance.iconProperty().bind(this.obsrv1Icon);
if (this.bound2Icon)
instance.iconProperty().bindBidirectional(this.obsrv2Icon);
}
/**
* 設定屬性{@link Glyph#setColor(javafx.scene.paint.Color)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B color(javafx.scene.paint.Color value)
{
this.hasColor = true;
this.valColor = value;
return (B) this;
}
/**
* 設定屬性{@link Glyph#setFontFamily(java.lang.String)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B fontFamily(java.lang.String value)
{
this.hasFontFamily = true;
this.valFontFamily = value;
return (B) this;
}
/**
* 設定屬性{@link Glyph#setFontSize(double)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B fontSize(double value)
{
this.hasFontSize = true;
this.valFontSize = value;
return (B) this;
}
/**
* 設定屬性{@link Glyph#setIcon(java.lang.Object)}。
*
* @param value 新的屬性值
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public B icon(java.lang.Object value)
{
this.hasIcon = true;
this.valIcon = value;
return (B) this;
}
/**
* 設定屬性{@link Glyph#iconProperty}的連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindIcon(javafx.beans.value.ObservableValue<? extends java.lang.Object> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Icon = true;
this.obsrv1Icon = source;
this.bound2Icon = false;
this.obsrv2Icon = null;
return (B) this;
}
/**
* 設定屬性{@link Glyph#iconProperty}的雙向連結。
*
* @param value 新的屬性連結(單向)
* @return 目前的建構器(this)
*/
@SuppressWarnings("unchecked")
public final B bindBidirectionalIcon(javafx.beans.property.Property<java.lang.Object> source)
{
java.util.Objects.requireNonNull(source);
this.bound1Icon = false;
this.obsrv1Icon = null;
this.bound2Icon = true;
this.obsrv2Icon = source;
return (B) this;
}
/**
* 建構{@link Glyph}物件。
*
* @return 新的{@link Glyph}物件實體
*/
@Override
@SuppressWarnings("unchecked")
public Glyph build()
{
Glyph instance = new Glyph();
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
/**
* 建構{@link Glyph}物件。
*
* @return 新的{@link Glyph}物件實體
*/
@SuppressWarnings("unchecked")
public Glyph build(java.lang.String arg0, char arg1)
{
Glyph instance = new Glyph(arg0, arg1);
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
/**
* 建構{@link Glyph}物件。
*
* @return 新的{@link Glyph}物件實體
*/
@SuppressWarnings("unchecked")
public Glyph build(java.lang.String arg0, java.lang.Object arg1)
{
Glyph instance = new Glyph(arg0, arg1);
this.applyTo((Z) instance);
this.doAfterBuild((Z) instance);
return instance;
}
}