RFR: 8369836: Update HeaderBar API [v6]
Michael Strauß
mstrauss at openjdk.org
Wed Dec 24 05:27:22 UTC 2025
On Wed, 24 Dec 2025 05:15:08 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> 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 three 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.
>> 3. Make `leftSystemInset`, `rightSystemInset`, and `minSystemHeight` attached properties for `Stage`.
>>
>> 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`.
>
> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:
>
> - review changes, headerbar properties
> - Merge branch 'master' into headerbar-update
> - stage doc
> - Merge branch 'master' into headerbar-update
> - documentation
> - Merge branch 'master' into headerbar-update
> - Make leftSystemInset/rightSystemInset/minSystemHeight attached properties
> - Update HeaderBar API
I've decided to have `HeaderBar.dragType`, `HeaderBar.buttonType`, and `HeaderBar.prefButtonHeight` also have an observable property getter. In contrast to that, `HeaderBar.alignment` and `HeaderBar.margin` don't have that: these are layout-related properties "borrowed" from `BorderPane`, and should be made observable if and when the same is done for the rest of the layout containers.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1936#issuecomment-3688720830
More information about the openjfx-dev
mailing list