Interface ItemView
- All Known Implementing Classes:
AbstractItemView,FloorView,InventoryView,KnowledgeTypeView,KnowledgeView,QuestsView,SpellSkillView,SpellsView
public interface ItemView
A list of
CfItems.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocationListener(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 Details
-
getSize
int getSize()Returns the number of items.- Returns:
- the number of items
-
getItem
Returns theCfItemin a given slot.- Parameters:
index- the slot index- Returns:
- the item or
nullif the slot is empty
-
addLocationsListener
Adds aLocationsListenerto be notified when any displayed item has changed.- Parameters:
locationsListener- the locations listener to add
-
removeLocationsListener
Removes aLocationsListenerto be notified when any displayed item has changed.- Parameters:
locationsListener- the locations listener to remove
-
addLocationListener
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
Removes aLocationListenerto be notified when the item displayed in a floor slot has changed.- Parameters:
index- the floor slotlocationListener- the location listener to remove
-