![JAR search and dependency download from the Maven repository](/logo.png)
BRIDJE-INF.srcgen.templates.jfx.Model.ftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bridje-jfx-srcgen Show documentation
Show all versions of bridje-jfx-srcgen Show documentation
Source Generation for Bridje JavaFX tools and components.
The newest version!
<#include "./ObjectUtils.ftl" />
package ${model.package};
<#list model.includes![] as inc>
import ${inc.fullName};
#list>
import javafx.beans.property.*;
import javafx.collections.ObservableList;
import javafx.scene.image.ImageView;
import org.bridje.jfx.utils.JfxUtils;
import javax.annotation.Generated;
/**
* ${model.description!}
*/
@Generated(value = "org.bridje.jfx.srcgen.JFxSourceGenerator", date = "${.now?string("yyyy-MM-dd")}", comments = "Generated by Bridje JavaFx API")
public class ${model.name}
{
<#list model.icons as icon>
public static ImageView ${icon.name}(int size)
{
return JfxUtils.loadImage(${model.name}.class, "${icon.file}", size, size);
}
#list>
<#list model.properties as property>
private final ${property.propertyDec} ${property.name}Property = new ${property.propertyDimDec}();
#list>
<#list model.properties as property>
/**
* Gets the property object for the ${property.name} field.
* ${property.description!}
*
* @return The property objecto for the ${property.name} field
*/
public ${property.propertyDec} ${property.name}Property()
{
return this.${property.name}Property;
}
/**
* Gets the value of the ${property.name} field.
* ${property.description!}
*
* @return The value of the ${property.name} field
*/
public ${property.javaType} get${property.name?cap_first}()
{
return this.${property.name}Property.get();
}
/**
* Sets the value of the ${property.name} field.
* ${property.description!}
*
* @param ${property.name} The value of the ${property.name} field.
*/
public void set${property.name?cap_first}(${property.javaType} ${property.name})
{
this.${property.name}Property.set(${property.name});
}
#list>
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy