简体   繁体   中英

JGoodies Binding: How to bind two ValueModels?

The simplified case is I have

ValueHolder a = new ValueHolder();

ValueHolder b = new ValueHolder();

I am looking for

[some JGoodies Class].[method](a,b);

That will connect those ValueModel s and keep them mutually updated

I can not find among all static classes like PropertyConnector , Bindings , ObjectBinder etc do not have a method to connect two ValueModels

I am sure I am missing something.

My actual use case a little bit more complicated as I am building a reusable component that has calculated ValueModel and I need for a code that will use it to pass a ValueModel that will be bonded to it so the user will be able to do other complicated things with it.

The simplest way

PropertyConnector.connect(valueModelA, "value", valueModelB, "value");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM