Interface ItemView

    • Method Detail

      • getSize

        int getSize()
        Returns the number of items.
        Returns:
        the number of items
      • getItem

        @Nullable
        @Nullable CfItem getItem​(int index)
        Returns the CfItem in a given slot.
        Parameters:
        index - the slot index
        Returns:
        the item or null if the slot is empty
      • addLocationsListener

        void addLocationsListener​(@NotNull
                                  @NotNull LocationsListener locationsListener)
        Adds a LocationsListener to be notified when any displayed item has changed.
        Parameters:
        locationsListener - the locations listener to add
      • removeLocationsListener

        void removeLocationsListener​(@NotNull
                                     @NotNull LocationsListener locationsListener)
        Removes a LocationsListener to be notified when any displayed item has changed.
        Parameters:
        locationsListener - the locations listener to remove
      • addLocationListener

        void addLocationListener​(int index,
                                 @NotNull
                                 @NotNull LocationListener locationListener)
        Adds a LocationListener to be notified when the item displayed in a floor slot has changed.
        Parameters:
        index - the floor slot
        locationListener - the location listener to add
      • removeLocationListener

        void removeLocationListener​(int index,
                                    @NotNull
                                    @NotNull LocationListener locationListener)
        Removes a LocationListener to be notified when the item displayed in a floor slot has changed.
        Parameters:
        index - the floor slot
        locationListener - the location listener to remove