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

org.fxmisc.richtext.CustomStyleableProperty Maven / Gradle / Ivy

There is a newer version: 0.11.3
Show newest version
package org.fxmisc.richtext;

import javafx.css.CssMetaData;
import javafx.css.Styleable;
import javafx.css.StyleableObjectProperty;

/**
 * Reduces the boilerplate when creating a custom CSS property (i.e. {@link javafx.css.StyleableProperty}).
 */
public class CustomStyleableProperty extends StyleableObjectProperty {

    private final Object bean;
    private final String name;
    private final CssMetaData cssMetaData;

    public CustomStyleableProperty(T initialValue, String name, Object bean,
                                   CssMetaData cssMetaData) {
        super(initialValue);
        this.bean = bean;
        this.name = name;
        this.cssMetaData = cssMetaData;
    }

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

    @Override
    public String getName() {
        return name;
    }

    @Override
    public CssMetaData getCssMetaData() {
        return cssMetaData;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy