Q: Rotated labels, layout and reflow
John Hendrikx
hjohn at xs4all.nl
Sat Dec 15 01:50:00 UTC 2018
(Sent this twice, first message got sent prematurely)
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:
+-HBox------------------------------------------------------------+
| | 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
line.
What I'm actually trying to achieve is a layout that looks like this:
+----+-------------------+
| T | |
| e | |
| x | |
| t | |
+----+ |
| | |
| T | |
| e | Image |
| x | |
| t | |
| | |
+----+ |
| T | |
| e | |
| x | |
| t | |
+----+-------------------+
Except of course the left area should be the rotated HBox.
Is this really not possible at the moment, without using a Canvas or
something and a lot of layout calculations (to get reflow working)?
Any feedback appreciated :)
--John
More information about the openjfx-dev
mailing list