![JAR search and dependency download from the Maven repository](/logo.png)
de.gsi.chart.ui.css.StylishBooleanProperty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chartfx-chart Show documentation
Show all versions of chartfx-chart Show documentation
This charting library ${project.artifactId}- is an extension
in the spirit of Oracle's XYChart and performance/time-proven JDataViewer charting functionalities.
Emphasis was put on plotting performance for both large number of data points and real-time displays,
as well as scientific accuracies leading to error bar/surface plots, and other scientific plotting
features (parameter measurements, fitting, multiple axes, zoom, ...).
package de.gsi.chart.ui.css;
import javafx.beans.NamedArg;
import javafx.css.CssMetaData;
import javafx.css.SimpleStyleableBooleanProperty;
import javafx.css.Styleable;
/**
*
* Short-hand to reduce boiler-plate type code of customisation of
* SimpleStyleableBooleanProperty to always include an axis re-layout.
*
* N.B. Also, the warning of inheriting more than 'n' generations is thrown only
* once this way.
*
* @author rstein
*
*/
public class StylishBooleanProperty extends SimpleStyleableBooleanProperty {
protected Runnable invalidateAction;
/**
* The constructor of the {@code StylishBooleanProperty}.
*
* @param cssMetaData
* the CssMetaData associated with this {@code StyleableProperty}
* @param bean
* the bean of this {@code BooleanProperty}
* @param name
* the name of this {@code BooleanProperty}
* @param initialValue
* the initial value of the wrapped {@code Object}
* @param invalidateAction
* lambda expression executed in invalidated
*/
public StylishBooleanProperty(@NamedArg("cssMetaData") CssMetaData extends Styleable, Boolean> cssMetaData,
@NamedArg("bean") Object bean, @NamedArg("name") String name,
@NamedArg("initialValue") boolean initialValue, Runnable invalidateAction) {
super(cssMetaData, bean, name, initialValue);
this.invalidateAction = invalidateAction;
}
@Override
protected void invalidated() {
invalidateAction.run();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy