首页 > 解决方案 > 如何更改对象属性到双装订

问题描述

如何将 ObjectProperty 更改为 DoubleBinding 然后放入 Bindings.createObjectBinding();

private transient ObjectProperty<BigDecimal>  buy;
private transient ObjectProperty<BigDecimal>  sell;

有以下错误:

buy = Bindings.createObjectBinding(() -> (operation.get() == Operation.BUY) ? volume.get() : 0, volume, operation);

sell = Bindings.createDoubleBinding(() -> (operation.get() == Operation.SELL) ? volume.get() : 0, volume, operation);

标签: javafxbinding

解决方案


推荐阅读