JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

Profile: desktop, common

Overview

Extension of javafx.stage.Stage that allows the creation of first-class Java Dialogs from JavaFX-only code. Dialogs can be created via declarative syntax and have any other Stage as their owner window. Some features not available on Stage include the ability to "pack" the window to the size of the contents, specify modality, and force the window to be on top.

This class is named JFXDialog to avoid future name collisions with JavaFX Dialog support when released. At that time this class will be changed to extend the official Dialog class, providing forward interoperability.

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
publicdialogJDialog

Returns the raw javax.swing.JDialog class that backs this Dialog instance.

Returns the raw javax.swing.JDialog class that backs this Dialog instance.

Please submit a request for any functionality you find that you need to access directly using this variable so it can be added to the JFXDialog API.

 
public-initindependentFocusBoolean

Allows an ownerless dialog to be focused independently from other ownerless windows.

Allows an ownerless dialog to be focused independently from other ownerless windows. This has no effect if owner is non-null.

 
public-initmodalBoolean

Whether this Dialog blocks user input in the owner Window until dismissed.

public-initownerStage

Owner window of this Dialog

public-initpackedBoolean

Sets the window size to match the contents.

Sets the window size to match the contents. More specifically, this iterates through all the content of the Scene to calculate the minimum Window size that will hold all the children. This will work with regular Nodes, but is Resizable aware, which allows more flexibility.

This will only be calculated once upon construction of the Dialog, so future size changes will be ignored.

 

Inherited Variables

Function Summary

public pack() : Void
 

Inherited Functions