![]() |
Crossfire JXClient, Trunk
|
Provides a view to all items comprising the current floor view. More...
Public Member Functions | |
FloorView (@NotNull final ItemSet itemSet) | |
Creates a new instance. More... | |
int | getCurrentFloorTag () |
Returns the current floor location. More... | |
CfItem | getItem (final int index) |
Returns the CfItem in a given slot. More... | |
int | getSize () |
Returns the number of items. More... | |
![]() | |
void | addLocationListener (final int index, @NotNull final LocationListener locationListener) |
Adds a LocationListener to be notified when the item displayed in a floor slot has changed. More... | |
void | addLocationsListener (@NotNull final LocationsListener locationsListener) |
Adds a LocationsListener to be notified when any displayed item has changed. More... | |
void | removeLocationListener (final int index, @NotNull final LocationListener locationListener) |
Removes a LocationListener to be notified when the item displayed in a floor slot has changed. More... | |
void | removeLocationsListener (@NotNull final LocationsListener locationsListener) |
Removes a LocationsListener to be notified when any displayed item has changed. More... | |
Private Member Functions | |
int | getOffset () |
Returns the number of non-inventory items to be displayed on the floor. More... | |
void | setCurrentFloorTag (final int currentFloorTag) |
Updates the currently opened container that's contents are shown in the floor view. More... | |
Private Attributes | |
int | currentFloorTag |
The tag of the currently shown container or. More... | |
final ItemListener | itemListener |
The ItemListener attached to the current floor object. More... | |
final ItemSet | itemSet |
The ItemSet to monitor. More... | |
final ItemSetListener | itemSetListener |
The ItemSetListener for detecting opened or closed containers. More... | |
Additional Inherited Members | |
![]() | |
AbstractItemView () | |
Creates a new instance. More... | |
void | addModified (final int index) |
Marks a slot as modified. More... | |
void | addModifiedRange (final int firstIndex, final int lastIndex) |
Marks a range of slots as modified. More... | |
Provides a view to all items comprising the current floor view.
If an opened container exists, the floor view consists of the container in the first slot followed by the contained items. Otherwise, all objects in location
are returned.
Definition at line 36 of file FloorView.java.
com.realtime.crossfire.jxclient.items.FloorView.FloorView | ( | @NotNull final ItemSet | itemSet | ) |
Creates a new instance.
itemSet | the item set to use |
Definition at line 105 of file FloorView.java.
References com.realtime.crossfire.jxclient.items.ItemSet.addInventoryListener(), com.realtime.crossfire.jxclient.items.ItemSet.addItemSetListener(), com.realtime.crossfire.jxclient.items.FloorView.currentFloorTag, com.realtime.crossfire.jxclient.items.ItemSet.getOpenContainer(), com.realtime.crossfire.jxclient.items.FloorView.itemListener, com.realtime.crossfire.jxclient.items.FloorView.itemSet, com.realtime.crossfire.jxclient.items.FloorView.itemSetListener, and com.realtime.crossfire.jxclient.items.FloorView.setCurrentFloorTag().
int com.realtime.crossfire.jxclient.items.FloorView.getCurrentFloorTag | ( | ) |
Returns the current floor location.
Definition at line 116 of file FloorView.java.
References com.realtime.crossfire.jxclient.items.FloorView.currentFloorTag.
Referenced by com.realtime.crossfire.jxclient.gui.item.GUIItemInventory.button3Clicked(), com.realtime.crossfire.jxclient.scripts.AbstractScriptProcess.cmdRequest(), and com.realtime.crossfire.jxclient.gui.commands.ExecSelectionCommand.execute().
CfItem com.realtime.crossfire.jxclient.items.FloorView.getItem | ( | final int | index | ) |
Returns the CfItem in a given slot.
index | the slot index |
Implements com.realtime.crossfire.jxclient.items.ItemView.
Definition at line 145 of file FloorView.java.
References com.realtime.crossfire.jxclient.items.FloorView.currentFloorTag, com.realtime.crossfire.jxclient.items.ItemSet.getInventoryItem(), com.realtime.crossfire.jxclient.items.ItemSet.getItemByTag(), and com.realtime.crossfire.jxclient.items.FloorView.itemSet.
|
private |
Returns the number of non-inventory items to be displayed on the floor.
Currently, this can be zero or one (virtual container to close the currently opened container).
Definition at line 166 of file FloorView.java.
References com.realtime.crossfire.jxclient.items.FloorView.currentFloorTag.
Referenced by com.realtime.crossfire.jxclient.items.FloorView.getSize().
int com.realtime.crossfire.jxclient.items.FloorView.getSize | ( | ) |
Returns the number of items.
Implements com.realtime.crossfire.jxclient.items.ItemView.
Definition at line 139 of file FloorView.java.
References com.realtime.crossfire.jxclient.items.FloorView.currentFloorTag, com.realtime.crossfire.jxclient.items.ItemSet.getNumberOfItemsByLocation(), com.realtime.crossfire.jxclient.items.FloorView.getOffset(), and com.realtime.crossfire.jxclient.items.FloorView.itemSet.
Referenced by com.realtime.crossfire.jxclient.items.FloorView.setCurrentFloorTag().
|
private |
Updates the currently opened container that's contents are shown in the floor view.
currentFloorTag | the current floor tag |
Definition at line 125 of file FloorView.java.
References com.realtime.crossfire.jxclient.items.ItemSet.addInventoryListener(), com.realtime.crossfire.jxclient.items.AbstractItemView.addModifiedRange(), com.realtime.crossfire.jxclient.items.FloorView.currentFloorTag, com.realtime.crossfire.jxclient.items.FloorView.getSize(), com.realtime.crossfire.jxclient.items.FloorView.itemListener, com.realtime.crossfire.jxclient.items.FloorView.itemSet, and com.realtime.crossfire.jxclient.items.ItemSet.removeInventoryListener().
Referenced by com.realtime.crossfire.jxclient.items.FloorView.FloorView().
|
private |
The tag of the currently shown container or.
if no container is open.
Definition at line 48 of file FloorView.java.
Referenced by com.realtime.crossfire.jxclient.items.FloorView.FloorView(), com.realtime.crossfire.jxclient.items.FloorView.getCurrentFloorTag(), com.realtime.crossfire.jxclient.items.FloorView.getItem(), com.realtime.crossfire.jxclient.items.FloorView.getOffset(), com.realtime.crossfire.jxclient.items.FloorView.getSize(), and com.realtime.crossfire.jxclient.items.FloorView.setCurrentFloorTag().
|
private |
The ItemListener attached to the current floor object.
Definition at line 73 of file FloorView.java.
Referenced by com.realtime.crossfire.jxclient.items.FloorView.FloorView(), and com.realtime.crossfire.jxclient.items.FloorView.setCurrentFloorTag().
|
private |
The ItemSet to monitor.
Definition at line 42 of file FloorView.java.
Referenced by com.realtime.crossfire.jxclient.items.FloorView.FloorView(), com.realtime.crossfire.jxclient.items.FloorView.getItem(), com.realtime.crossfire.jxclient.items.FloorView.getSize(), and com.realtime.crossfire.jxclient.items.FloorView.setCurrentFloorTag().
|
private |
The ItemSetListener for detecting opened or closed containers.
Definition at line 55 of file FloorView.java.
Referenced by com.realtime.crossfire.jxclient.items.FloorView.FloorView().