If you have a complex logic, you can create your own binding by either extending the corresponding abstract base class—DoubleBinding, StringBinding, ObjectBinding—there are several options for different types; or by using a utility method from the Bindings class.