Class SpellsView

  • All Implemented Interfaces:
    ItemView

    public class SpellsView
    extends AbstractItemView
    Provides a view of all spells a character knows.
    • Constructor Detail

      • SpellsView

        public SpellsView​(@NotNull
                          @NotNull SpellsManager spellsManager,
                          @NotNull
                          @NotNull FacesManager facesManager)
        Creates a new instance.
        Parameters:
        spellsManager - the spells to display
        facesManager - the faces manager for retrieving face information
    • Method Detail

      • getSize

        public int getSize()
        Description copied from interface: ItemView
        Returns the number of items.
        Returns:
        the number of items
      • getItem

        @Nullable
        public @Nullable CfItem getItem​(int index)
        Description copied from interface: ItemView
        Returns the CfItem in a given slot.
        Parameters:
        index - the slot index
        Returns:
        the item or null if the slot is empty