Q: Rotated labels, layout and reflow

John Hendrikx hjohn at xs4all.nl
Sat Dec 15 01:46:20 UTC 2018

Hi list,

I get the impression that rotation of Labels needs to be something that 
is directly supported by Label instead of handling this with a Rotate 
transform (setRotate).

I want to achieve something quite trivial if no rotation was involved, a 
layout like this, an HBox with 3 labels in it:

  |            | Long text that can reflow to multiple |            |
  | Short Text | lines if needed...                    | Short Text |
  |            |                                       |            |

The center label would be given grow Priority.ALWAYS.

Now... the rotated version just goes wrong in so many ways.

First, I need to use Groups in order to get the layout bounds 
reasonable... however, these are unaware of how much space is available 
and will kill the reflow in the center Label.

If I put a Group around the whole HBox, the same issue occurs as the 
Group blocks any awareness of how big the area is where the three labels 
are going to appear, effectively rendering the center label as one long 

What I'm actually trying to achieve is a layout that looks like this:

   |    |                   |
   |    |                   |
   |    |                   |
   |    |                   |
   |    |                   |
   |    |                   |
   |    |                   |
   |    |                   |

More information about the openjfx-dev mailing list