RFR: 8369836: Update HeaderBar API
Andy Goryachev
andy.goryachev at oracle.com
Tue Oct 14 16:52:15 UTC 2025
Can you clarify what you mean by "aligning with" BorderPane?
Does it mean we are trying to propagate somewhat misleading terminology that was used by the BorderPane (setLeft() in RTL mode results in the added node on the right side, so it should really be named something like setLeading() instead of setLeft()).
Thanks,
-andy
From: openjfx-dev <openjfx-dev-retn at openjdk.org> on behalf of Michael Strauß <mstrauss at openjdk.org>
Date: Tuesday, October 14, 2025 at 09:40
To: openjfx-dev at openjdk.org <openjfx-dev at openjdk.org>
Subject: RFR: 8369836: Update HeaderBar API
The `HeaderBar` control currently has three areas: `leading`, `center`, and `trailing`. Additionally, there's `leftSystemInset` and `rightSystemInset`, which are not RTL adjusted. I've come to the understanding that there is no particularly good reason for this, because every time you would want to use this information for layout purposes, it should also be adjusted for RTL.
With this in mind, there are two changes for the `HeaderBar` control:
1. Rename `leading` to `left`, and `trailing` to `right`, which aligns the terminology with `BorderPane`.
2. Adjust `leftSystemInset` and `rightSystemInset` for RTL.
With this change, the `HeaderBar` control is more semantically consistent and easier to use, and the renamed `left` and `right` areas now show its close relationship with `BorderPane`.
-------------
Commit messages:
- Update HeaderBar API
Changes: https://git.openjdk.org/jfx/pull/1936/files
Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1936&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8369836
Stats: 212 lines in 3 files changed: 14 ins; 56 del; 142 mod
Patch: https://git.openjdk.org/jfx/pull/1936.diff
Fetch: git fetch https://git.openjdk.org/jfx.git pull/1936/head:pull/1936
PR: https://git.openjdk.org/jfx/pull/1936
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251014/cb6293e4/attachment-0001.htm>
More information about the openjfx-dev
mailing list