Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DialogFactoryService

[45:7] extends: EngineService

Wraps an AussomDialogFactoryService (subclass of FXGL's abstract DialogFactoryService). This is a subclass-extension contract: FXGL calls into the registered service when a dialog is requested, and each abstract method dispatches to the matching Aussom callback. When a callback is not supplied, the bridge returns null for that dialog, so callers should always wire the dialog methods their game uses. Each Aussom callback must return an AussomJavaObject around a javafx.scene.layout.Pane (the dialog body). Callbacks that receive a Runnable / Consumer / Predicate get those wrapped as raw AussomJavaObjects; invoke them via aji.invokeRaw on the appropriate method (run, accept, test). Method signatures (matching the abstract base): onMessageDialog(message) onMessageDialogCb(message, runnableAjo) onConfirmationDialog(message, consumerAjo) onChoiceDialogVarargs(message, consumerAjo, firstOptionAjo, optionsListOfAjo) onChoiceDialogList(message, optionsListOfAjo, consumerAjo) onInputDialog(message, consumerAjo) onInputDialogFiltered(message, predicateAjo, consumerAjo) onInputDialogWithCancel(message, predicateAjo, consumerAjo) onErrorDialogThrowable(throwableAjo) onErrorDialogThrowableCb(throwableAjo, runnableAjo) onErrorDialogMessage(errorMessage) onErrorDialogMessageCb(errorMessage, runnableAjo) onProgressDialog(message, observableDoublePropertyAjo, runnableAjo) onProgressDialogIndeterminate(message, runnableAjo) onCustomDialog(message, contentNodeAjo, runnableAjo, buttonsListOfAjo)

Methods

  • DialogFactoryService ()

    Creates a new DialogFactoryService bridge.

  • adopt (object Ajo)

    Wraps an existing service AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an AussomDialogFactoryService.
    • @r A new wrapper.
  • onMessageDialog (callback Cb)

    Registers the single-argument messageDialog handler.

    • @p Cb is a callback (string message) -> Pane AJO.
    • @r this object
  • onMessageDialogCb (callback Cb)

    Registers the messageDialog handler with a follow-up Runnable.

    • @p Cb is a callback (string message, runnableAjo) -> Pane AJO.
    • @r this object
  • onConfirmationDialog (callback Cb)

    Registers the confirmationDialog handler.

    • @p Cb is a callback (string message, consumerAjo) -> Pane AJO.
    • @r this object
  • onChoiceDialogVarargs (callback Cb)

    Registers the varargs choiceDialog handler.

    • @p Cb is a callback (string message, consumerAjo, firstOptionAjo, optionsListOfAjo) -> Pane AJO.
    • @r this object
  • onChoiceDialogList (callback Cb)

    Registers the List-form choiceDialog handler.

    • @p Cb is a callback (string message, optionsListOfAjo, consumerAjo) -> Pane AJO.
    • @r this object
  • onInputDialog (callback Cb)

    Registers the inputDialog handler.

    • @p Cb is a callback (string message, consumerAjo) -> Pane AJO.
    • @r this object
  • onInputDialogFiltered (callback Cb)

    Registers the filtered inputDialog handler.

    • @p Cb is a callback (string message, predicateAjo, consumerAjo) -> Pane AJO.
    • @r this object
  • onInputDialogWithCancel (callback Cb)

    Registers the inputDialogWithCancel handler.

    • @p Cb is a callback (string message, predicateAjo, consumerAjo) -> Pane AJO.
    • @r this object
  • onErrorDialogThrowable (callback Cb)

    Registers the Throwable-only errorDialog handler.

    • @p Cb is a callback (throwableAjo) -> Pane AJO.
    • @r this object
  • onErrorDialogThrowableCb (callback Cb)

    Registers the Throwable+Runnable errorDialog handler.

    • @p Cb is a callback (throwableAjo, runnableAjo) -> Pane AJO.
    • @r this object
  • onErrorDialogMessage (callback Cb)

    Registers the message-only errorDialog handler.

    • @p Cb is a callback (string message) -> Pane AJO.
    • @r this object
  • onErrorDialogMessageCb (callback Cb)

    Registers the message+Runnable errorDialog handler.

    • @p Cb is a callback (string message, runnableAjo) -> Pane AJO.
    • @r this object
  • onProgressDialog (callback Cb)

    Registers the determinate progressDialog handler.

    • @p Cb is a callback (string message, readOnlyDoublePropertyAjo, runnableAjo) -> Pane AJO.
    • @r this object
  • onProgressDialogIndeterminate (callback Cb)

    Registers the indeterminate progressDialog handler.

    • @p Cb is a callback (string message, runnableAjo) -> Pane AJO.
    • @r this object
  • onCustomDialog (callback Cb)

    Registers the customDialog handler.

    • @p Cb is a callback (string message, contentNodeAjo, runnableAjo, buttonsListOfAjo) -> Pane AJO.
    • @r this object