Basics
Guides
API Reference
Basics
Guides
API Reference
[23:7] extends: FxObj
The Dialog class wraps javafx.scene.control.Dialog, the base class for the JavaFX pop-up dialogs (Alert, TextInputDialog, ChoiceDialog). It owns a DialogPane and provides the shared title, header, content, graphic, sizing, window, and show/hide behavior that every dialog inherits. This wrapper is not constructed directly. Concrete dialog subclasses extend it, mirroring the JavaFX inheritance model, and set this.obj in their own constructors. The event handler and filter methods (addEventHandler, addEventFilter, removeEventHandler, removeEventFilter) are wrapped below; they take an EventType obtained with fx.eventType(...), for example fx.eventType(fxevent.DIALOG_SHOWING). Dialog does not expose fireEvent, and the buildEventDispatchChain routing internal is intentionally not wrapped.
Dialog ()
Base constructor. Dialog is abstract in practice and is never instantiated on its own.
setTitle (string Title)
Sets the dialog window title.
Title is a string with the title text.this object for chaininggetTitle ()
Returns the dialog window title.
A string with the title text.titleProperty ()
Returns the StringProperty backing the title.
An AJO wrapping javafx.beans.property.StringProperty.setHeaderText (string Text)
Sets the header text shown above the content.
Text is a string with the header text.this object for chaininggetHeaderText ()
Returns the header text.
A string with the header text, or null when none is set.headerTextProperty ()
Returns the StringProperty backing the header text.
An AJO wrapping javafx.beans.property.StringProperty.setContentText (string Text)
Sets the main content text of the dialog.
Text is a string with the content text.this object for chaininggetContentText ()
Returns the main content text of the dialog.
A string with the content text.contentTextProperty ()
Returns the StringProperty backing the content text.
An AJO wrapping javafx.beans.property.StringProperty.setGraphic (object GraphicNode = null)
Sets a graphic node shown in the dialog header area.
GraphicNode is a Node wrapper, or null to clear.this object for chaininggetGraphic ()
Returns the header graphic node.
An AJO wrapping javafx.scene.Node, or null when none is set.graphicProperty ()
Returns the ObjectProperty backing the graphic.
An AJO wrapping ObjectPropertygetDialogPane ()
Returns the DialogPane that holds the dialog layout and buttons.
An AJO wrapping javafx.scene.control.DialogPane.setDialogPane (Pane)
Sets the DialogPane for this dialog.
Pane is a DialogPane wrapper or a raw AJO.this object for chainingdialogPaneProperty ()
Returns the ObjectProperty backing the DialogPane.
An AJO wrapping ObjectPropertygetResult ()
Returns the result produced by the dialog after it is closed.
An AJO or value with the dialog result, or null.setResult (Value)
Sets the dialog result value. Accepts a primitive, a raw AJO, or null.
Value is the result value to store.this object for chainingresultProperty ()
Returns the ObjectProperty backing the result.
An AJO wrapping ObjectProperty.show ()
Shows the dialog without blocking the caller.
this object for chainingshowAndWait ()
Shows the dialog and blocks until the user closes it.
An AJO wrapping the Optional result of the dialog.hide ()
Hides the dialog.
this object for chainingclose ()
Closes the dialog.
this object for chainingisShowing ()
Returns whether the dialog is currently showing.
A bool that is true while the dialog is visible.showingProperty ()
Returns the ReadOnlyBooleanProperty backing the showing state.
An AJO wrapping ReadOnlyBooleanProperty.setResizable (bool Resizable)
Sets whether the user can resize the dialog window.
Resizable is a bool; true allows resizing.this object for chainingisResizable ()
Returns whether the dialog window is resizable.
A bool that is true when resizing is allowed.resizableProperty ()
Returns the BooleanProperty backing the resizable flag.
An AJO wrapping javafx.beans.property.BooleanProperty.setWidth (double W)
Sets the dialog window width in pixels.
W is a double with the width.this object for chaininggetWidth ()
Returns the dialog window width in pixels.
A double with the width.widthProperty ()
Returns the ReadOnlyDoubleProperty backing the width.
An AJO wrapping ReadOnlyDoubleProperty.setHeight (double H)
Sets the dialog window height in pixels.
H is a double with the height.this object for chaininggetHeight ()
Returns the dialog window height in pixels.
A double with the height.heightProperty ()
Returns the ReadOnlyDoubleProperty backing the height.
An AJO wrapping ReadOnlyDoubleProperty.setX (double X)
Sets the dialog window x position on screen, in pixels.
X is a double with the x coordinate.this object for chaininggetX ()
Returns the dialog window x position on screen, in pixels.
A double with the x coordinate.xProperty ()
Returns the ReadOnlyDoubleProperty backing the x position.
An AJO wrapping ReadOnlyDoubleProperty.setY (double Y)
Sets the dialog window y position on screen, in pixels.
Y is a double with the y coordinate.this object for chaininggetY ()
Returns the dialog window y position on screen, in pixels.
A double with the y coordinate.yProperty ()
Returns the ReadOnlyDoubleProperty backing the y position.
An AJO wrapping ReadOnlyDoubleProperty.initModality (string ModalityName)
Sets the dialog modality. Must be called before the dialog is shown.
ModalityName is a javafx.stage.Modality constant name: NONE, WINDOW_MODAL, or APPLICATION_MODAL.this object for chaininggetModality ()
Returns the dialog modality.
An AJO wrapping javafx.stage.Modality.initStyle (string StyleName)
Sets the dialog window style. Must be called before the dialog is shown.
StyleName is a javafx.stage.StageStyle constant name: DECORATED, UNDECORATED, TRANSPARENT, UTILITY, or UNIFIED.this object for chaininginitOwner (OwnerWindow = null)
Sets the owner window for this dialog. Must be called before the dialog is shown.
OwnerWindow is a Window wrapper or a raw AJO, or null for no owner.this object for chaininggetOwner ()
Returns the owner window of this dialog.
An AJO wrapping javafx.stage.Window, or null when there is no owner.setOnShowing (callback Cb)
Registers a callback invoked just before the dialog is shown.
Cb is a callback invoked with a DialogEvent.this object for chaininggetOnShowing ()
Returns the onShowing handler.
An AJO wrapping javafx.event.EventHandler, or null.onShowingProperty ()
Returns the ObjectProperty backing the onShowing handler.
An AJO wrapping ObjectPropertysetOnShown (callback Cb)
Registers a callback invoked just after the dialog is shown.
Cb is a callback invoked with a DialogEvent.this object for chaininggetOnShown ()
Returns the onShown handler.
An AJO wrapping javafx.event.EventHandler, or null.onShownProperty ()
Returns the ObjectProperty backing the onShown handler.
An AJO wrapping ObjectPropertysetOnHiding (callback Cb)
Registers a callback invoked just before the dialog is hidden.
Cb is a callback invoked with a DialogEvent.this object for chaininggetOnHiding ()
Returns the onHiding handler.
An AJO wrapping javafx.event.EventHandler, or null.onHidingProperty ()
Returns the ObjectProperty backing the onHiding handler.
An AJO wrapping ObjectPropertysetOnHidden (callback Cb)
Registers a callback invoked just after the dialog is hidden.
Cb is a callback invoked with a DialogEvent.this object for chaininggetOnHidden ()
Returns the onHidden handler.
An AJO wrapping javafx.event.EventHandler, or null.onHiddenProperty ()
Returns the ObjectProperty backing the onHidden handler.
An AJO wrapping ObjectPropertysetOnCloseRequest (callback Cb)
Registers a callback invoked when the dialog receives a close request.
Cb is a callback invoked with a DialogEvent.this object for chaininggetOnCloseRequest ()
Returns the onCloseRequest handler.
An AJO wrapping javafx.event.EventHandler, or null.onCloseRequestProperty ()
Returns the ObjectProperty backing the onCloseRequest handler.
An AJO wrapping ObjectPropertysetResultConverter (callback Cb)
Registers a converter that turns the clicked button into the dialog result.
Cb is a callback invoked with the ButtonType, returning the result.this object for chaininggetResultConverter ()
Returns the result converter callback.
An AJO wrapping javafx.util.Callback, or null.resultConverterProperty ()
Returns the ObjectProperty backing the result converter.
An AJO wrapping ObjectPropertyaddEventHandler (object EventTypeObj, callback Cb)
Adds an event handler for the given event type. The handler fires in the bubbling phase, and multiple handlers may be registered for one type.
EventTypeObj is an event type, obtained from fx.eventType(...), for example fx.eventType(fxevent.DIALOG_SHOWING).Cb is a callback that receives the event.A handler reference. Keep it if you intend to remove the handler later with removeEventHandler; otherwise it can be ignored.removeEventHandler (object EventTypeObj, object Handler)
Removes a handler previously added with addEventHandler. JavaFX matches by identity, so pass the handler reference that addEventHandler returned.
EventTypeObj is an event type, obtained from fx.eventType(...).Handler is the handler reference returned by addEventHandler.this object for chainingaddEventFilter (object EventTypeObj, callback Cb)
Adds an event filter for the given event type. Filters fire in the capturing phase, before handlers, so a filter can inspect or consume an event before it reaches its target.
EventTypeObj is an event type, obtained from fx.eventType(...).Cb is a callback that receives the event.A filter reference. Keep it if you intend to remove the filter later with removeEventFilter; otherwise it can be ignored.removeEventFilter (object EventTypeObj, object Handler)
Removes a filter previously added with addEventFilter. Pass the filter reference that addEventFilter returned.
EventTypeObj is an event type, obtained from fx.eventType(...).Handler is the filter reference returned by addEventFilter.this object for chaining
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.