com.realtime.crossfire.jxclient.gui.item
Class GUIItemInventoryFactory

java.lang.Object
  extended by com.realtime.crossfire.jxclient.gui.item.GUIItemInventoryFactory
All Implemented Interfaces:
GUIItemItemFactory

public class GUIItemInventoryFactory
extends java.lang.Object
implements GUIItemItemFactory

A factory for creating GUIItemInventory instances.


Field Summary
private  CommandQueue commandQueue
           
private  CrossfireServerConnection crossfireServerConnection
           
private  GUIElementListener elementListener
          The GUIElementListener to notify.
private  FacesManager facesManager
           
private  FloorView floorView
           
private  ItemView inventoryView
          The inventory view to use.
private  ItemPainter itemPainter
           
private  java.lang.String name
           
private  TooltipManager tooltipManager
          The tooltip manager to update.
 
Constructor Summary
GUIItemInventoryFactory(TooltipManager tooltipManager, GUIElementListener elementListener, CommandQueue commandQueue, java.lang.String name, ItemPainter itemPainter, CrossfireServerConnection crossfireServerConnection, FacesManager facesManager, FloorView floorView, ItemView inventoryView)
          Creates a new instance.
 
Method Summary
 int getMoveLocation()
          Returns the location to move items to when moving away.
 GUIElement newItem(int index)
          Creates a new GUIItemInventory instance.
 GUIItemItem newTemplateItem(int cellHeight)
          Creates a new GUIItemInventory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandQueue

@NotNull
private final CommandQueue commandQueue

crossfireServerConnection

@NotNull
private final CrossfireServerConnection crossfireServerConnection

elementListener

@NotNull
private final GUIElementListener elementListener
The GUIElementListener to notify.


facesManager

@NotNull
private final FacesManager facesManager

floorView

@NotNull
private final FloorView floorView

inventoryView

@NotNull
private final ItemView inventoryView
The inventory view to use.


itemPainter

@NotNull
private final ItemPainter itemPainter

name

@NotNull
private final java.lang.String name

tooltipManager

@NotNull
private final TooltipManager tooltipManager
The tooltip manager to update.

Constructor Detail

GUIItemInventoryFactory

public GUIItemInventoryFactory(@NotNull
                               TooltipManager tooltipManager,
                               @NotNull
                               GUIElementListener elementListener,
                               @NotNull
                               CommandQueue commandQueue,
                               @NotNull
                               java.lang.String name,
                               @NotNull
                               ItemPainter itemPainter,
                               @NotNull
                               CrossfireServerConnection crossfireServerConnection,
                               @NotNull
                               FacesManager facesManager,
                               @NotNull
                               FloorView floorView,
                               @NotNull
                               ItemView inventoryView)
Creates a new instance.

Parameters:
tooltipManager - the tooltip manager to update
elementListener - the element listener to notify
floorView - the floor view to use
inventoryView - the inventory view to use
Method Detail

getMoveLocation

public int getMoveLocation()
Returns the location to move items to when moving away.

Specified by:
getMoveLocation in interface GUIItemItemFactory
Returns:
the location

newItem

@NotNull
public GUIElement newItem(int index)
Creates a new GUIItemInventory instance.

Specified by:
newItem in interface GUIItemItemFactory
Parameters:
index - the item inventory's index
Returns:
the new instance

newTemplateItem

@NotNull
public GUIItemItem newTemplateItem(int cellHeight)
Creates a new GUIItemInventory instance.

Specified by:
newTemplateItem in interface GUIItemItemFactory
Parameters:
cellHeight - the cell size
Returns:
the new instance