I have a problem figuering out what the best procedure would be, to have a growing and shrinking BorderPane
. I want to try and enlarge or shrink the Pane horizontally, based on a Text
node child it has (with changing text length). There are some additional constraints / problems that I have to consider:
- Can not use a
Label
, because they render worse in a 3D scene. Even with lcd / gray / Cache on or off. - The Text node does a linewrapping, if the text length is bigger than its bounding box width
- Using
setWrappingWidth(0)
automatically right align's the Text node instead of the horizontal center alignment I need. - Using
setWrappingWidht(Double.MAX_VALUE)
throws exception in 3D scene when passing by with camera. - Have not figuered out how to actually set the width of the node. I can get it with
getLayoutBounds().getWidth()
. - The Text Node class doesn't seem to have any usable width bindings?