Interface ComponentDialogBuilder

All Superinterfaces:
DialogBuilder<ComponentDialogBuilder>

public interface ComponentDialogBuilder extends DialogBuilder<ComponentDialogBuilder>
A builder for JDialog containing a single component.
  • Method Details

    • modal

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

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

      Parameters:
      size - the size of the dialog
      Returns:
      this DialogBuilder instance
    • enterAction

      ComponentDialogBuilder enterAction(Action enterAction)
      Parameters:
      enterAction - the action to associate with the ENTER key
      Returns:
      this DialogBuilder instance
    • closeObserver

      ComponentDialogBuilder closeObserver(Observer<?> closeObserver)
      Sets the Observer which triggers the closing of the dialog, note that disposeOnEscape(boolean) has no effect if a closeObserver is specified.
      Parameters:
      closeObserver - if specified the dialog will be disposed of when and only when this observer is notified
      Returns:
      this DialogBuilder instance
    • confirmCloseListener

      ComponentDialogBuilder confirmCloseListener(Consumer<State> confirmCloseListener)
      Parameters:
      confirmCloseListener - this listener, if specified, will be queried for confirmation before the dialog is closed, using the State instance to signal confirmation, the dialog will only be closed if that state is active after a call to Consumer.accept(Object)
      Returns:
      this DialogBuilder instance
    • disposeOnEscape

      ComponentDialogBuilder disposeOnEscape(boolean disposeOnEscape)
      Parameters:
      disposeOnEscape - if yes then the dialog is disposed when the ESC button is pressed, has no effect if a closeEvent is specified
      Returns:
      this DialogBuilder instance
    • onShown

      Parameters:
      onShown - called each time the dialog is shown
      Returns:
      this builder instance
    • onOpened

      Parameters:
      onOpened - called when dialog is opened
      Returns:
      this DialogBuilder instance
    • onClosed

      Parameters:
      onClosed - called when dialog is closed
      Returns:
      this DialogBuilder instance
    • build

      JDialog build()
      Returns:
      a new JDialog instance based on this builder.
    • show

      JDialog show()
      Builds and shows the dialog.
      Returns:
      a new JDialog instance based on this builder.