Javafx Verkettung von mehreren StringProperty

Gibt es eine einfache Möglichkeit zum binden einer Verkettung von StringProperty-Objekten?

Hier ist, was ich tun will:

TextField t1 = new TextField();
TextField t2 = new TextField();

StringProperty s1 = new SimpleStringProperty();
Stringproperty s2 = new SimpleStringProperty();
Stringproperty s3 = new SimpleStringProperty();

s1.bind( t1.textProperty() ); //Binds the text of t1
s2.bind( t2.textProperty() ); //Binds the text of t2

//What I want to do, theoretically :
s3.bind( s1.getValue() + " <some Text> " + s2.getValue() );

Wie kann ich das tun?

InformationsquelleAutor kaligne | 2014-08-15
Schreibe einen Kommentar