Package space.maxus.flare.ui.page
Class PageFrame
- All Implemented Interfaces:
ReactivityProvider
- Direct Known Subclasses:
Modal.ModalFrame
A Frame implementation used within
DefaultPagination-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic final recordstatic interface -
Field Summary
Fields inherited from class space.maxus.flare.ui.frames.ParamFrame
dimensions, holder, props -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a cancelling left click handlervoidAdds a cancelling right click handlervoidAdds a cancelling shift click handlerprotected booleanbooleandrag(@NotNull Map<Slot, org.bukkit.inventory.ItemStack> newItems, @NotNull org.bukkit.event.inventory.InventoryDragEvent e) Called when items are dragged across this frame.booleanvoidgenericClick(@NotNull Slot slot, @NotNull org.bukkit.event.inventory.InventoryClickEvent e) Called every time this frame is clicked.getTitle()Gets the default title of this frame.inthashCode()voidinit()Called once inside the constructorbooleanCalled when this frame is left clickedvoidload()voidonClick(PageFrame.SimpleClickHandler simple) Adds a generic click handlervoidonDrag(PageFrame.DragHandler drag) Adds a drag event handlervoidAdds a left click handlervoidAdds a right click handlervoidAdds a shift click handlerbooleanrightClick(@NotNull Slot slot, @NotNull org.bukkit.event.inventory.InventoryClickEvent e) Called when this frame is right clickedvoidSets the title of this frame and broadcasts it to the provided viewerbooleanshiftClick(@NotNull Slot slot, @NotNull org.bukkit.event.inventory.InventoryClickEvent e) Called when this frame is shift clickedtoString()voidSets the default title of this pageMethods inherited from class space.maxus.flare.ui.frames.ParamFrame
getDimensions, getHolder, preInit, selfInventory, setHolderMethods inherited from class space.maxus.flare.ui.Frame
bindViewer, close, composableMap, compose, compose, composeAll, context, contextOrNull, fireDrag, fireGenericClick, fireLeftClick, fireRightClick, fireShiftClick, fireShiftRequest, getViewer, goBack, markDirty, markDirty, markDirty, onClose, onOpen, open, refreshTitle, render, renderPart, restorePreviousState, shiftRequest, switchFrame, useBoundState, useContext, useStateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface space.maxus.flare.react.ReactivityProvider
useMemo, useUnboundState
-
Constructor Details
-
PageFrame
-
-
Method Details
-
onClick
Adds a generic click handler- Parameters:
simple- Generic click handler
-
cancellingOnShiftClick
Adds a cancelling shift click handler- Parameters:
simple- The handler
-
onShiftClick
Adds a shift click handler- Parameters:
bool- The handler
-
cancellingOnLeftClick
Adds a cancelling left click handler- Parameters:
simple- The handler
-
onLeftClick
Adds a left click handler- Parameters:
bool- The handler
-
cancellingOnRightClick
Adds a cancelling right click handler- Parameters:
simple- The handler
-
onRightClick
Adds a right click handler- Parameters:
bool- The handler
-
onDrag
Adds a drag event handler- Parameters:
drag- The handler
-
useTitle
Sets the default title of this page- Parameters:
title- Title of the page
-
init
public void init()Description copied from class:FrameCalled once inside the constructor- Specified by:
initin classParamFrame<PageFrame.Props>
-
load
@Internal public void load() -
genericClick
public void genericClick(@NotNull @NotNull Slot slot, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent e) Description copied from class:FrameCalled every time this frame is clicked.- Overrides:
genericClickin classFrame- Parameters:
slot- Slot that was clickede- The click event
-
shiftClick
public boolean shiftClick(@NotNull @NotNull Slot slot, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent e) Description copied from class:FrameCalled when this frame is shift clicked- Overrides:
shiftClickin classFrame- Parameters:
slot- Slot that was clickede- The click event- Returns:
- True if the event should be cancelled, false otherwise
-
leftClick
public boolean leftClick(@NotNull @NotNull Slot slot, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent e) Description copied from class:FrameCalled when this frame is left clicked -
rightClick
public boolean rightClick(@NotNull @NotNull Slot slot, @NotNull @NotNull org.bukkit.event.inventory.InventoryClickEvent e) Description copied from class:FrameCalled when this frame is right clicked- Overrides:
rightClickin classFrame- Parameters:
slot- Slot that was clickede- The click event- Returns:
- True if the event should be cancelled, false otherwise
-
drag
public boolean drag(@NotNull @NotNull Map<Slot, org.bukkit.inventory.ItemStack> newItems, @NotNull @NotNull org.bukkit.event.inventory.InventoryDragEvent e) Description copied from class:FrameCalled when items are dragged across this frame. This method is currently experimental and may not work correctly -
setTitle
Description copied from class:FrameSets the title of this frame and broadcasts it to the provided viewer -
getTitle
Description copied from class:FrameGets the default title of this frame. `A Flare $className` by default. -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-