Summary
Support client-side window decorations in JavaFX, allowing applications to place JavaFX controls in the header bar. This is a preview feature that might be changed or removed in a future JavaFX release.
Problem
Modern applications often use client-side window decorations, where the client area is extended to cover the entire window. This allows applications to place controls in the header bar area, and style it to create a cohesive look and feel with the rest of the application.
Solution
The new EXTENDED
stage style is added, which enables the platform toolkit integration necessary to support client-side window decorations. In addition, the javafx.scene.layout.HeaderBar
control is added, which applications need to use to replace the system-provided header bar. The HeaderBar
control provides the "click and drag" and "double-click to maximize" behaviors for the window, as well as platform-specific window manager integrations like snap layouts on Windows.
By default, the HeaderBar
control comes with default header buttons that mimic the platform-native header buttons (iconify, maximize, close). If more control is desired, the default header buttons can be removed, allowing applications to use standard JavaFX buttons instead.
Specification
Add the following new classes:
javafx.scene.layout.HeaderBar
javafx.scene.layout.HeaderButtonType
javafx.scene.layout.HeaderDragType
Add the following new enum value:
javafx.stage.StageStyle.EXTENDED
- csr of
-
JDK-8313424 JavaFX controls in the title bar (Preview)
-
- Open
-