Class RuntimeGridSession
java.lang.Object
com.ultikits.ultitools.ui.runtime.RuntimeSession<Ack>
com.ultikits.ultitools.ui.runtime.RuntimeGridSession
- All Implemented Interfaces:
GridSession, UiSession<Ack>
Separates the module's latest snapshot from the backend's rendered snapshot.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Set<SlotContainer> private Gridprivate Gridprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionRuntimeGridSession(RuntimeUiService service, org.bukkit.entity.Player viewer, Grid grid) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidattachBindings(Grid snapshot) (package private) static Set<SlotContainer> boundContainers(Grid grid) (package private) voidcurrent()The snapshot currently shown.(package private) voidprivate voiddetachExcept(Set<SlotContainer> retained) (package private) voidprivate void(package private) voidredraw()(package private) Grid(package private) voidprivate voidrunAction(GridAction action, GridSlot slot, ClickKind kind) (package private) voidvoidReplaces the snapshot:GridSession.current()returnsnextas soon as this returns.(package private) static voidvalidateContainers(Grid grid) Methods inherited from class RuntimeSession
choose, close, closeAndComplete, dispatch, intent, isOpen, isOpenLocked, openTask, requestChoose, requestClose, result, viewer
-
Field Details
-
current
-
rendered
-
picture
-
updateQueued
private boolean updateQueued -
attached
-
-
Constructor Details
-
RuntimeGridSession
RuntimeGridSession(RuntimeUiService service, org.bukkit.entity.Player viewer, Grid grid)
-
-
Method Details
-
current
Description copied from interface:GridSessionThe snapshot currently shown.- Specified by:
currentin interfaceGridSession
-
renderedLocked
Grid renderedLocked() -
update
Description copied from interface:GridSessionReplaces the snapshot:GridSession.current()returnsnextas soon as this returns. The backend is told in a later task of the viewer's entity context, never inside this call; several updates made before that task may reach the backend as one, the latest. A click runs the action of the snapshot the backend had last been given when the click was reported (seeGridAction). The title may change; a backend may reopen the screen to show it, which does not end the session. Does nothing once the session is not open (UiSession.isOpen()).- Specified by:
updatein interfaceGridSession
-
validateContainers
-
boundContainers
-
takeBindings
void takeBindings()- Overrides:
takeBindingsin classRuntimeSession<Ack>
-
attachBindings
-
detachBindings
void detachBindings()- Overrides:
detachBindingsin classRuntimeSession<Ack>
-
detachExcept
-
notifyBackend
private void notifyBackend() -
drawPicture
void drawPicture() -
pictureCopy
-
redraw
void redraw() -
renderPicture
void renderPicture() -
clicked
- Overrides:
clickedin classRuntimeSession<Ack>
-
runAction
-