ModalBuilder

Properties

Link copied to clipboard
abstract val modals: Modals

Functions

Link copied to clipboard
open override fun addComponents(vararg components: ModalTopLevelComponent): ModalBuilder
Link copied to clipboard
@CheckReturnValue
fun bindTo(handler: Consumer<ModalEvent>): ModalBuilder

Binds the action to the consumer.

abstract fun bindTo(handler: suspend (ModalEvent) -> Unit): ModalBuilder

Binds the action to the closure.

@CheckReturnValue
fun bindTo(handlerName: String, vararg userData: Any?): ModalBuilder
@CheckReturnValue
abstract fun bindTo(handlerName: String, userData: List<Any?>): ModalBuilder

Binds the action to a @ModalHandler with its arguments.

Link copied to clipboard
@CheckReturnValue
abstract override fun build(): Modal
Link copied to clipboard
Link copied to clipboard
@Nonnull
open fun getId(): String
Link copied to clipboard
@Nonnull
open fun getTitle(): String
Link copied to clipboard
abstract override fun setId(customId: String): ModalBuilder
Link copied to clipboard
open override fun setTitle(title: String): ModalBuilder
Link copied to clipboard
@CheckReturnValue
fun timeout(timeout: Duration, onTimeout: Runnable? = null): ModalBuilder
abstract fun timeout(timeout: Duration, onTimeout: suspend () -> Unit? = null): ModalBuilder
@CheckReturnValue
fun timeout(timeout: Long, unit: TimeUnit, onTimeout: Runnable? = null): ModalBuilder

Sets the timeout for this modal, invalidating the modal after expiration, and running the given timeout handler.