Class BaseItem

java.lang.Object
de.studiocode.invui.item.impl.BaseItem
All Implemented Interfaces:
Item
Direct Known Subclasses:
AsyncItem, AutoCycleItem, ControlItem, CycleItem, SimpleItem, SuppliedItem

public abstract class BaseItem extends Object implements Item
The base for all Items.
  • Constructor Details

    • BaseItem

      public BaseItem()
  • Method Details

    • addWindow

      public void addWindow(Window window)
      Description copied from interface: Item
      Adds a Window to the window set, telling the Item that it is currently being displayed in that Window.
      Specified by:
      addWindow in interface Item
      Parameters:
      window - The Window the Item is currently displayed in.
    • removeWindow

      public void removeWindow(Window window)
      Description copied from interface: Item
      Removes an Window from the window set, telling the Item that it is no longer being displayed in that Window.
      Specified by:
      removeWindow in interface Item
      Parameters:
      window - The Window the Item is no longer displayed in.
    • getWindows

      public Set<Window> getWindows()
      Description copied from interface: Item
      Gets an immutable Set of all the Windows where this Item is displayed in.
      Specified by:
      getWindows in interface Item
      Returns:
      An immutable view of the Set of all the Windows where this Item is displayed in.
    • notifyWindows

      public void notifyWindows()
      Description copied from interface: Item
      Calls the Window.handleItemProviderUpdate(Item) method on every Window in the set, notifying them that the ItemProvider has been updated and the ItemStack inside the Window's Inventory should be replaced.
      Specified by:
      notifyWindows in interface Item