Class GUISpellList

All Implemented Interfaces:
GUIElement, GUIScrollable, ImageObserver, MenuContainer, Serializable

public class GUISpellList extends GUIItemList<GUIItemSpell>
A GUIList to display spells.
See Also:
  • Constructor Details

    • GUISpellList

      public GUISpellList(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, int cellWidth, int cellHeight, @NotNull @NotNull ItemView itemView, @Nullable @Nullable AbstractLabel currentItem, @NotNull @NotNull SpellsManager spellsManager, @NotNull @NotNull KeybindingsManager keybindingsManager, @NotNull @NotNull CommandQueue commandQueue, @NotNull @NotNull ItemPainter itemPainter, @NotNull @NotNull FacesManager facesManager, @NotNull @NotNull GuiFactory guiFactory)
      Creates a new instance.
      Parameters:
      tooltipManager - the tooltip manager to update
      elementListener - the element listener to notify
      name - the name of this element
      cellWidth - the width of cells
      cellHeight - the height of cells
      itemView - the item view to monitor
      currentItem - the label to update with information about the selected item.
      spellsManager - the spells to display
      keybindingsManager - the bindings for displaying shortcuts
      commandQueue - the command queue for sending commands
      itemPainter - the item painter for painting the icon
      facesManager - the faces manager to use
      guiFactory - the global GUI factory instance
  • Method Details

    • getTooltip

      @Nullable protected @Nullable String getTooltip(int index)
      Description copied from class: GUIList
      Returns the tooltip text.
      Specified by:
      getTooltip in class GUIList<GUIItemSpell>
      Parameters:
      index - the index to use
      Returns:
      the tooltip text
    • newItem

      @NotNull protected @NotNull GUIItemSpell newItem(int index)
      Description copied from class: GUIItemList
      Creates a new GUIElement instance.
      Specified by:
      newItem in class GUIItemList<GUIItemSpell>
      Parameters:
      index - the item inventory's index
      Returns:
      the new instance
    • notifyOpen

      public void notifyOpen()
      Description copied from interface: GUIElement
      Called each time the enclosing dialog is opened (or raised).