All Downloads are FREE. Search and download functionalities are using the official Maven repository.

BRIDJE-INF.srcgen.templates.jfx.Model.ftl Maven / Gradle / Ivy

The newest version!
<#include "./ObjectUtils.ftl" />

package ${model.package};

<#list model.includes![] as inc>
import ${inc.fullName};

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 model.properties as property>
    private final ${property.propertyDec} ${property.name}Property = new ${property.propertyDimDec}();

    

    <#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});
    }

    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy