UndoFX:无法设置绑定值

时间:2016-06-07 01:52:36

标签: javafx reactfx

我使用UndoFX将撤消和重做功能转换为矩形。 到目前为止它的位置,大小和旋转都很好,除了形状的fillProperty颜色。

问题在于我无法将我的形状与ColorPicker组件绑定,我得到了无限的例外:

  

Rectangle.fill:无法设置绑定值。

我如何使用undofx函数和绑定?

colorField.valueProperty().setValue((Color) (currentSelected.getRect().fillProperty().getValue()));

currentSelected.getRect().fillProperty().bind(colorField.valueProperty());

previousSelected.getRect().fillProperty().unbind();

0 个答案:

没有答案