如何为多个属性添加一些约束?假设我们有以下属性:
DoubleProperty min = new SimpleDoubleProperty(this, "max", 0.0);
DoubleProperty max = new SimpleDoubleProperty(this, "min", 1.0);
DoubleProperty value = new SimpleDoubleProperty(this, "value", 0.0);
,约束是
min.get() <= value.get() && value.get() <= max.
也许为自定义Control
更容易实现这一点,因为这些值只能在FX Application线程中设置,因此不能同时设置?