00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 package com.realtime.crossfire.jxclient.gui.list;
00023
00024 import com.realtime.crossfire.jxclient.gui.gui.GUIElementListener;
00025 import com.realtime.crossfire.jxclient.gui.gui.TooltipManager;
00026 import com.realtime.crossfire.jxclient.gui.item.GUIItemItemFactory;
00027 import com.realtime.crossfire.jxclient.gui.label.AbstractLabel;
00028 import com.realtime.crossfire.jxclient.items.ItemView;
00029 import org.jetbrains.annotations.NotNull;
00030 import org.jetbrains.annotations.Nullable;
00031
00036 public class GUIFloorList extends GUIItemList {
00037
00041 private static final long serialVersionUID = 1L;
00042
00046 private final int cellWidth;
00047
00051 private final int cellHeight;
00052
00065 public GUIFloorList(@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final int cellWidth, final int cellHeight, @NotNull final ItemView itemView, @Nullable final AbstractLabel currentItem, @NotNull final GUIItemItemFactory itemItemFactory) {
00066 super(tooltipManager, elementListener, name, cellWidth, cellHeight, itemView, currentItem, itemItemFactory);
00067 this.cellWidth = cellWidth;
00068 this.cellHeight = cellHeight;
00069 }
00070
00075 public int getNumLookObjects() {
00076 return Math.max(getWidth()/cellWidth, 1)*Math.max(getHeight()/cellHeight, 1);
00077 }
00078
00079 }