Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8356115

JavaFX controls in the title bar (Preview)

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • javafx
    • None
    • source, binary
    • minimal
    • Adding a new value to the `StageStyle` enum is a breaking change that might affect applications that are unprepared to handle the new value (for example, by using an exhaustive switch expression).
    • Java API
    • JDK

      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

            mstrauss Michael Strauß
            mfox Martin Fox
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: