RFR: 8369836: Update HeaderBar API [v14]
Andy Goryachev
angorya at openjdk.org
Tue Jan 6 23:58:09 UTC 2026
On Tue, 6 Jan 2026 22:52:34 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`.
>>
>> In addition to that, two new `HeaderDragType` constants are added:
>> * `TRANSPARENT`: when set on a node, excludes the node from draggable-area hit testing
>> * `TRANSPARENT_SUBTREE`: the same, but also applies to the node's subtree
>
> Michael Strauß has updated the pull request incrementally with two additional commits since the last revision:
>
> - use native constants
> - typo
So far looks good on macOS, I'll do more testing tomorrow.
FYI, I've added Drag Type context menu that applies to all the header bar's children in the Stage page, use this branch:
https://github.com/andy-goryachev-oracle/MonkeyTest/tree/update.header.bar.api
<img width="673" height="362" alt="Image" src="https://github.com/user-attachments/assets/ca2ab1f7-47d2-4661-b855-c2ee737d315f" />
modules/javafx.graphics/src/main/java/com/sun/glass/ui/View.java line 2:
> 1: /*
> 2: * Copyright (c) 2010, 2026, Oracle and/or its affiliates. All rights reserved.
2026?
here and PickResultChooser, Stage, StageTesterWindow, GlassWindow.cpp
-------------
PR Review: https://git.openjdk.org/jfx/pull/1936#pullrequestreview-3632784046
PR Review Comment: https://git.openjdk.org/jfx/pull/1936#discussion_r2666536915
More information about the openjfx-dev
mailing list