Package xyz.xenondevs.invui.item.impl
Class AutoUpdateItem
java.lang.Object
xyz.xenondevs.invui.item.impl.AbstractItem
xyz.xenondevs.invui.item.impl.SuppliedItem
xyz.xenondevs.invui.item.impl.AutoUpdateItem
- All Implemented Interfaces:
Item
An
Item that updates its ItemProvider every specified amount
of ticks.-
Constructor Summary
ConstructorsConstructorDescriptionAutoUpdateItem(int period, Supplier<? extends ItemProvider> builderSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWindow(AbstractWindow window) Adds anAbstractWindowto the window set, telling theItemthat it is currently being displayed in thatAbstractWindow.voidcancel()voidremoveWindow(AbstractWindow window) Removes anAbstractWindowfrom the window set, telling theItemthat it is no longer being displayed in thatAbstractWindow.voidstart()Methods inherited from class xyz.xenondevs.invui.item.impl.SuppliedItem
getItemProvider, handleClickMethods inherited from class xyz.xenondevs.invui.item.impl.AbstractItem
getWindows, notifyWindowsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface xyz.xenondevs.invui.item.Item
getItemProvider
-
Constructor Details
-
AutoUpdateItem
-
-
Method Details
-
start
public void start() -
cancel
public void cancel() -
addWindow
Description copied from interface:ItemAdds anAbstractWindowto the window set, telling theItemthat it is currently being displayed in thatAbstractWindow.- Specified by:
addWindowin interfaceItem- Overrides:
addWindowin classAbstractItem- Parameters:
window- TheAbstractWindowtheItemis currently displayed in.
-
removeWindow
Description copied from interface:ItemRemoves anAbstractWindowfrom the window set, telling theItemthat it is no longer being displayed in thatAbstractWindow.- Specified by:
removeWindowin interfaceItem- Overrides:
removeWindowin classAbstractItem- Parameters:
window- TheAbstractWindowtheItemis no longer displayed in.
-