// ******************** Constructors **************************************
public HeatControl() {
getStyleClass().add("heat-control");
value = new DoublePropertyBase(0) {
@Override protected void invalidated() {
set(clamp(getMinValue(), getMaxValue(), get()));
}
@Override public Object getBean() { return this; }
@Override public String getName() { return "value"; }
};
minValue = new DoublePropertyBase(0) {
@Override protected void invalidated() {
if (getValue() < get()) setValue(get());
}
@Override public Object getBean() { return this; }
@Override public String getName() { return "minValue"; }
};
maxValue = new DoublePropertyBase(40) {
@Override protected void invalidated() {
if (getValue() > get()) setValue(get());
}
@Override public Object getBean() { return this; }
@Override public String getName() { return "maxValue"; }
};
oldValue = 0;
target = new DoublePropertyBase(20) {
@Override protected void invalidated() {
set(clamp(getMinValue(), getMaxValue(), get()));
}
@Override public Object getBean() { return this; }
@Override public String getName() { return "target"; }