Example usage for javafx.beans.property StringPropertyBase StringPropertyBase

List of usage examples for javafx.beans.property StringPropertyBase StringPropertyBase

Introduction

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

Prototype

public StringPropertyBase() 

Source Link

Document

The constructor of the StringPropertyBase .

Usage

From source file:com.ggvaidya.scinames.model.Dataset.java

/**
 * Used to store notes associated with this change. This is actually a property ("note"), so
 * we create a StringProperty to wrap it.
 *///from  w ww.j  a va2  s  . c o  m
public StringProperty noteProperty() {
    Dataset dataset = this;

    return new StringPropertyBase() {
        @Override
        public String getName() {
            return "note";
        }

        @Override
        public Object getBean() {
            return dataset;
        }

        @Override
        public String get() {
            return dataset.getProperties().get("note");
        }

        @Override
        public void set(String value) {
            dataset.getProperties().put("note", value);
            dataset.lastModified.modified();
        }
    };
}