Class DialogController<PreparationType,ResultType>
java.lang.Object
page.codeberg.friedolyn.gui.controllers.Controller<PreparationType>
page.codeberg.friedolyn.gui.controllers.DialogController<PreparationType,ResultType>
- Type Parameters:
PreparationType- The type of the object that is passed to theController.prepare(PreparationType)method.ResultType- The type of the result that is returned by thegetResult()method.
- All Implemented Interfaces:
javafx.fxml.Initializable,Preparable<PreparationType>
- Direct Known Subclasses:
ContactController,ContactReplyMethodDialogController,SetupController,SetupEmailDialogController,SetupNtfyDialogController,SetupUnifiedPushDialogController
public abstract class DialogController<PreparationType,ResultType>
extends Controller<PreparationType>
A class that defines the behaviour of a dialog in the JavaFX graphical user interface. The dialog asks the user for
certain input and, once it is closed,
getResult() returns the result of the dialog.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidconfirm()This method is called when the user confirms the dialog, i.e.abstract @NonNull Optional<ResultType> Methods inherited from class page.codeberg.friedolyn.gui.controllers.Controller
close, getSuccess, prepareMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javafx.fxml.Initializable
initialize
-
Constructor Details
-
DialogController
public DialogController()
-
-
Method Details
-
getResult
- Returns:
- The result of the dialog. May contain nonsensical data if the dialog has not been closed yet.
-
confirm
public abstract void confirm()This method is called when the user confirms the dialog, i.e. presses some kind of "OK" button after having entered the necessary data.
-