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

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

public class GUIItemFloorFactory
extends java.lang.Object
implements GUIItemItemFactory

A factory for creating GUIItemFloor instances.


Field Summary
private  CommandQueue commandQueue
          The CommandQueue for sending commands.
private  CrossfireServerConnection crossfireServerConnection
          The CrossfireServerConnection to use.
private  GUIElementListener elementListener
          The GUIElementListener to notify.
private  FacesManager facesManager
          The FacesManager to use.
private  FloorView floorView
          The FloorView to use.
private  ItemPainter itemPainter
          The ItemPainter to use.
private  ItemSet itemSet
          The ItemSet to use.
private  java.lang.String name
          The base name.
private  java.awt.Image nextGroupFace
          The Image for "next group of items".
private  java.awt.Image prevGroupFace
          The Image for "prev group of items".
private  TooltipManager tooltipManager
          The tooltip manager to update.
 
Constructor Summary
GUIItemFloorFactory(TooltipManager tooltipManager, GUIElementListener elementListener, CommandQueue commandQueue, java.lang.String name, ItemPainter itemPainter, CrossfireServerConnection crossfireServerConnection, FacesManager facesManager, FloorView floorView, ItemSet itemSet, java.awt.Image nextGroupFace, java.awt.Image prevGroupFace)
          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
The CommandQueue for sending commands.


crossfireServerConnection

@NotNull
private final CrossfireServerConnection crossfireServerConnection
The CrossfireServerConnection to use.


elementListener

@NotNull
private final GUIElementListener elementListener
The GUIElementListener to notify.


facesManager

@NotNull
private final FacesManager facesManager
The FacesManager to use.


floorView

@NotNull
private final FloorView floorView
The FloorView to use.


itemPainter

@NotNull
private final ItemPainter itemPainter
The ItemPainter to use.


itemSet

@NotNull
private final ItemSet itemSet
The ItemSet to use.


name

@NotNull
private final java.lang.String name
The base name.


nextGroupFace

@NotNull
private final java.awt.Image nextGroupFace
The Image for "next group of items".


prevGroupFace

@NotNull
private final java.awt.Image prevGroupFace
The Image for "prev group of items".


tooltipManager

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

Constructor Detail

GUIItemFloorFactory

public GUIItemFloorFactory(@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
                           ItemSet itemSet,
                           @NotNull
                           java.awt.Image nextGroupFace,
                           @NotNull
                           java.awt.Image prevGroupFace)
Creates a new instance.

Parameters:
tooltipManager - the tooltip manager to update
elementListener - the element listener to notify
commandQueue - the command queue for sending commands
name - the base name
itemPainter - the item painter to use
crossfireServerConnection - the crossfire server connection to use
facesManager - the faces manager to use
floorView - the floor view to use
itemSet - the item set to use
nextGroupFace - the image for "next group of items"
prevGroupFace - the image for "prev group of items"
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