Class PagedView<T extends Ingredient>
java.lang.Object
ru.cwcode.tkach.refreshmenu.inventory.view.AbstractView
ru.cwcode.tkach.refreshmenu.inventory.view.View
ru.cwcode.tkach.refreshmenu.inventory.view.PagedView<T>
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder,Refreshable
- Direct Known Subclasses:
ExtendedView,ShopView
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected charprotected intprotected intprotected intprotected org.bukkit.entity.PlayerFields inherited from class ru.cwcode.tkach.refreshmenu.inventory.view.View
behavior, drawer, placeholders, shape, statesFields inherited from class ru.cwcode.tkach.refreshmenu.inventory.view.AbstractView
canCloseHimself, inventory, menu -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDynamic(int slot) getIngredient(char character, int slot) getPageForChar(char ingredientChar, int ingredientIndex) getSlotOnThisPageForChar(char ingredientChar, int ingredientIndex) booleanbooleanbooleanprotected voidvoidnextPage()voidopen(org.bukkit.entity.Player player) voidprevPage()voidrefresh()voidsetDynamic(List<T> dynamic) protected voidupdateDynamicContent(org.bukkit.entity.Player player) protected voidvoidMethods inherited from class ru.cwcode.tkach.refreshmenu.inventory.view.View
drawInventory, execute, getInventory, getNormalizedSlot, getSlotForChar, getState, handleBehaviorClickAction, handleException, handleIngredientClickAction, handleIngredientClickActionDeferred, handleIngredientClickActionImmediate, hasClickBehavior, isInventoryInitialized, onInventoryClick, onOwnInventoryClick, prepareForDrawing, redrawClickedIngredient, setState, updateInventoryTitle, updateRequiredMethods inherited from class ru.cwcode.tkach.refreshmenu.inventory.view.AbstractView
onDrag, onDrag, onInventoryClose, onOutsideClick
-
Field Details
-
dynamic
-
page
protected transient int page -
maxPage
protected transient int maxPage -
pageSize
protected transient int pageSize -
dynamicChar
protected char dynamicChar -
player
protected org.bukkit.entity.Player player
-
-
Constructor Details
-
PagedView
public PagedView()
-
-
Method Details
-
getDrawer
-
setDynamic
-
open
-
hasViewers
public boolean hasViewers() -
refresh
public void refresh()- Specified by:
refreshin interfaceRefreshable
-
updateStates
public void updateStates()- Overrides:
updateStatesin classView
-
updatePlaceholders
protected void updatePlaceholders()- Overrides:
updatePlaceholdersin classView
-
getDynamic
-
hasNextPage
public boolean hasNextPage() -
nextPage
public void nextPage() -
hasPrevPage
public boolean hasPrevPage() -
prevPage
public void prevPage() -
updateDynamicContent
protected void updateDynamicContent(org.bukkit.entity.Player player) -
getPageForChar
-
getSlotOnThisPageForChar
-
initializeDrawer
protected void initializeDrawer()- Overrides:
initializeDrawerin classView
-
getIngredient
- Overrides:
getIngredientin classView
-