Interface OkCancelDialogBuilder

All Superinterfaces:
ActionDialogBuilder<OkCancelDialogBuilder>, DialogBuilder<OkCancelDialogBuilder>

public interface OkCancelDialogBuilder extends ActionDialogBuilder<OkCancelDialogBuilder>
Builds a modal dialog for displaying the given component, with OK and Cancel buttons based on the given actions. An OK action must be provided and the default Cancel action simply disposes the dialog.
  • Method Details

    • okEnabled

      OkCancelDialogBuilder okEnabled(ObservableState okEnabled)
      Note that this is overridden by okAction(Action).
      Parameters:
      okEnabled - the state observer controlling the ok enabled state
      Returns:
      this builder instance
      Throws:
      IllegalStateException - in case an ok action has already been set
    • cancelEnabled

      OkCancelDialogBuilder cancelEnabled(ObservableState cancelEnabled)
      Note that this is overridden by cancelAction(Action).
      Parameters:
      cancelEnabled - the state observer controlling the cancel enabled state
      Returns:
      this builder instance
      Throws:
      IllegalStateException - in case a cancel action has already been set
    • onOk

      Parameters:
      onOk - called on ok pressed, before the dialog has been disposed
      Returns:
      this builder instance
      Throws:
      IllegalStateException - in case an ok action has already been set
    • onCancel

      OkCancelDialogBuilder onCancel(Runnable onCancel)
      Parameters:
      onCancel - called on cancel pressed, before the dialog has been disposed
      Returns:
      this builder instance
      Throws:
      IllegalStateException - in case a cancel action has already been set
    • okAction

      OkCancelDialogBuilder okAction(Action okAction)
      Note that this action is responsible for closing the dialog.
      Parameters:
      okAction - the action for the OK button, this action must dispose the dialog
      Returns:
      this builder instance
    • cancelAction

      OkCancelDialogBuilder cancelAction(Action cancelAction)
      Note that this action is responsible for closing the dialog.
      Parameters:
      cancelAction - the action for the Cancel button, this action must dispose the dialog
      Returns:
      this builder instance