mainRec.setX(textViewBounds.getMinX());
mainRec.setWidth(textViewBounds.getWidth());
middleRec.setWidth(mainRec.getWidth() / 2);
}
});
textView.heightProperty().addListener(new ChangeListener<Number>() {
@Override
public void changed(ObservableValue<? extends Number> observable,
Number oldValue, Number newValue) {
final Bounds textViewBounds = textView.getBoundsInLocal();
mainRec.setY(textViewBounds.getMinY());