Interface ComponentDialogBuilder

    • Method Detail

      • 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
      • enterAction

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

        ComponentDialogBuilder closeEvent​(EventObserver<?> closeEvent)
        Sets the Event which triggers the closing of the dialog, note that disposeOnEscape(boolean) has no effect if the closeEvent is specified.
        Parameters:
        closeEvent - if specified the dialog will be disposed of when and only when this event occurs
        Returns:
        this DialogBuilder instance
      • confirmCloseListener

        ComponentDialogBuilder confirmCloseListener​(EventDataListener<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 EventDataListener.onEvent(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
      • build

        JDialog build()
        Returns:
        a new JDialog instance based on this builder.
        Throws:
        IllegalStateException - in case no component has been specified
      • show

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