Example usage for javafx.beans.property.adapter JavaBeanStringPropertyBuilder JavaBeanStringPropertyBuilder

List of usage examples for javafx.beans.property.adapter JavaBeanStringPropertyBuilder JavaBeanStringPropertyBuilder

Introduction

In this page you can find the example usage for javafx.beans.property.adapter JavaBeanStringPropertyBuilder JavaBeanStringPropertyBuilder.

Prototype

JavaBeanStringPropertyBuilder

Source Link

Usage

From source file:de.knoplab.todomaven.task.TodoTaskWrapper.java

public TodoTaskWrapper(TodoTask task) {

    this.task = task;

    // the BeanPropertyBuilder creates a property that calls the getters and setters of the task object;
    // In other words, each time the property is changed, it will called setDone or getIsDone from
    // the wrapped task.
    try {//  w  w w .ja v a 2s . c om
        this.stateProperty = new JavaBeanObjectPropertyBuilder<>().bean(this.task).name("state").build();
        this.nameProperty = new JavaBeanStringPropertyBuilder().bean(this.task).name("name").build();
    } catch (Exception e) {
        e.printStackTrace();
    }

}