Interface ItemView
-
- All Known Implementing Classes:
AbstractItemView,FloorView,InventoryView,KnowledgeTypeView,KnowledgeView,QuestsView,SpellSkillView,SpellsView
public interface ItemViewA list ofCfItems.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddLocationListener(int index, @NotNull LocationListener locationListener)Adds aLocationListenerto be notified when the item displayed in a floor slot has changed.voidaddLocationsListener(@NotNull LocationsListener locationsListener)Adds aLocationsListenerto be notified when any displayed item has changed.@Nullable CfItemgetItem(int index)Returns theCfItemin a given slot.intgetSize()Returns the number of items.voidremoveLocationListener(int index, @NotNull LocationListener locationListener)Removes aLocationListenerto be notified when the item displayed in a floor slot has changed.voidremoveLocationsListener(@NotNull LocationsListener locationsListener)Removes aLocationsListenerto be notified when any displayed item has changed.
-
-
-
Method Detail
-
getSize
int getSize()
Returns the number of items.- Returns:
- the number of items
-
getItem
@Nullable @Nullable CfItem getItem(int index)
Returns theCfItemin a given slot.- Parameters:
index- the slot index- Returns:
- the item or
nullif the slot is empty
-
addLocationsListener
void addLocationsListener(@NotNull @NotNull LocationsListener locationsListener)Adds aLocationsListenerto be notified when any displayed item has changed.- Parameters:
locationsListener- the locations listener to add
-
removeLocationsListener
void removeLocationsListener(@NotNull @NotNull LocationsListener locationsListener)Removes aLocationsListenerto 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 aLocationListenerto be notified when the item displayed in a floor slot has changed.- Parameters:
index- the floor slotlocationListener- the location listener to add
-
removeLocationListener
void removeLocationListener(int index, @NotNull @NotNull LocationListener locationListener)Removes aLocationListenerto be notified when the item displayed in a floor slot has changed.- Parameters:
index- the floor slotlocationListener- the location listener to remove
-
-