Class DialogBackend
java.lang.Object
com.ultikits.ultitools.ui.dialog.DialogBackend
- All Implemented Interfaces:
UiBackend
-
Nested Class Summary
Nested classes/interfaces inherited from interface UiBackend
UiBackend.BackendCallbacks<R> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DialogAnswers(package private) static final booleanprivate final Loggerprivate final DialogMapperprivate final DialogPresenterprivate final Map<UiSession<?>, DialogTicket> -
Constructor Summary
ConstructorsConstructorDescriptionDialogBackend(Messages messages, DialogPresenter presenter, Logger logger, Function<? super UiSession<?>, String> ownerNames) Creates an isolated backend; registration and message catalogues belong to runtime wiring. -
Method Summary
Modifier and TypeMethodDescriptionvoidDismisses only a successfully shown, unanswered screen.net.kyori.adventure.key.Keyid()Unique backend identity.voidinterrupt(org.bukkit.entity.Player player) Reports game-driven dismissal only for this backend's shown dialogs, on the server thread.<R> voidopen(UiSession<R> session, UiBackend.BackendCallbacks<R> callbacks) Openssession's intent; reports throughcallbacks.static DialogBackendCreates the Paper presenter without registering it or constructing any registry objects.intpriority()Higher wins; unique among registered backends.private static booleanrepresentable(double value, double tolerance) private static booleanrepresentable(SliderInput slider) Bounds the float spacing at the largest absolute endpoint, including negative and zero-crossing ranges.booleanWhether this backend can showintenttoviewernow.voidupdate(GridSession session, Grid previous, Grid next) Showsnextinstead ofpreviouson a grid this backend opened, before returning.
-
Field Details
-
ESCAPE_CLOSES
static final boolean ESCAPE_CLOSES- See Also:
-
mapper
-
presenter
-
answers
-
logger
-
ownerNames
-
tickets
-
-
Constructor Details
-
DialogBackend
-
-
Method Details
-
paper
-
id
-
priority
-
supports
Description copied from interface:UiBackendWhether this backend can showintenttoviewernow. May depend on the intent's content (for example the inputs of a form) and on the viewer (for example client capabilities). -
representable
Bounds the float spacing at the largest absolute endpoint, including negative and zero-crossing ranges. RequiringULP <= step / 2bounds nearest-float rounding error by step / 4, leaving a margin before the contract's half-step snap boundary. Equality is accepted; a larger ULP rejects the whole range even when its endpoints and initial value happen to be exactly representable. Endpoint and initial casts are also checked explicitly, and a non-finite or zero float step remains unsupported. -
representable
private static boolean representable(double value, double tolerance) -
open
Description copied from interface:UiBackendOpenssession's intent; reports throughcallbacks. For aGridit showsGridSession.current()as it is at this call, which may already differ from the intent. -
interrupt
public void interrupt(org.bukkit.entity.Player player) Reports game-driven dismissal only for this backend's shown dialogs, on the server thread. -
update
Description copied from interface:UiBackendShowsnextinstead ofpreviouson a grid this backend opened, before returning.previousis the snapshot this backend was last given (byopenorupdate). Called only while the session is open. A backend that cannot change the title of a shown screen may reopen it to show a new title; that does not end the session. -
close
-