Class DialogService

java.lang.Object
de.spiritscorp.datasync.gui.DialogService

public class DialogService extends Object
Service responsible for managing UI dialogs and alerts. Ensures strict thread safety by bridging background thread calls to the JavaFX Application Thread.
  • Constructor Details

    • DialogService

      public DialogService(javafx.stage.Stage stage)
      Constructs a new DialogService bound to a specific primary window stage.
      Parameters:
      stage - The parent stage container, must not be null
      Throws:
      NullPointerException - if the provided stage is null
  • Method Details

    • askUser

      public boolean askUser(String title, String header, String content)
      Displays a confirmation dialog to the user and blocks until a selection is made. Automatically handles cross-thread invocations without throwing structural exceptions.
      Parameters:
      title - The descriptive title of the dialog window
      header - The contextual header text of the notification
      content - The message body containing instructions or questions
      Returns:
      true if the user confirmed via OK, false if canceled or closed