Binding textProperty to Expression
<p>Sorry if the question is looks pretty simple  but I'm little bit confused with Java bindings.</p>

<p>I need to bind textProperty  of the label   to the  SimpleIntegerProperty of the object but as a result of the condition check.</p>

<p>SimpleIntegerProperty can be 0,1,2,3,4,5,6     and depending on the value there's String values assigned to textProperty.</p>

<p>Like: </p>

<pre><code>SimpleIntegerProperty is 0  -&gt;  textProperty   displays "State 0"
SimpleIntegerProperty is 1  -&gt;  textProperty   displays "State 1"
SimpleIntegerProperty is 2  -&gt;  textProperty   displays "State 2"
</code></pre>

<p>etc...</p>

<p>I tried to do it with Bindings.createStringBinding  but it does not allow to use "if" statements inside it.</p>

<p>Thanks for the help.</p>