Interface ActionDialogBuilder<B extends ActionDialogBuilder<B>>

All Superinterfaces:
DialogBuilder<B>
All Known Subinterfaces:
OkCancelDialogBuilder

public interface ActionDialogBuilder<B extends ActionDialogBuilder<B>> extends DialogBuilder<B>
Builds a dialog with a button panel based on actions.
  • Method Details

    • action

      B action(Action action)
      Parameters:
      action - the action to add
      Returns:
      this builder instance
    • defaultAction

      B defaultAction(Action defaultAction)
      A default action is triggered by the Enter key
      Parameters:
      defaultAction - the default action to add
      Returns:
      this builder instance
    • escapeAction

      B escapeAction(Action escapeAction)
      An escape action is triggered by the Escape key
      Parameters:
      escapeAction - the escape action to add
      Returns:
      this builder instance
    • modal

      B modal(boolean modal)
      Parameters:
      modal - true if the dialog should be modal
      Returns:
      this builder instance
    • resizable

      B resizable(boolean resizable)
      Parameters:
      resizable - true if the dialog should be resizable
      Returns:
      this builder instance
    • size

      B size(Dimension size)
      Parameters:
      size - the size of the dialog
      Returns:
      this builder instance
    • buttonPanelConstraints

      B buttonPanelConstraints(int buttonPanelConstraints)
      Parameters:
      buttonPanelConstraints - the FlowLayout panel constraints for the button panel
      Returns:
      this builder instance
    • buttonPanelBorder

      B buttonPanelBorder(Border buttonPanelBorder)
      Parameters:
      buttonPanelBorder - the button panel border
      Returns:
      this builder instance
    • onShown

      B onShown(Consumer<JDialog> onShown)
      Parameters:
      onShown - called each time the dialog is shown
      Returns:
      this builder instance
    • show

      JDialog show()
      Builds and shows the dialog.
      Returns:
      a new JDialog instance based on this builder.
      Throws:
      IllegalStateException - in case no controls have been specified
    • build

      JDialog build()
      Returns:
      a new JDialog instance based on this builder.
      Throws:
      IllegalStateException - in case no controls have been specified