Class GUICharacterList

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

public class GUICharacterList extends GUIList<GUICharacter>
A GUIList display characters of an account.
See Also:
  • Constructor Details

    • GUICharacterList

      public GUICharacterList(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull FacesManager facesManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, int cellWidth, int cellHeight, @NotNull @NotNull Font font, @NotNull @NotNull CharacterModel characterModel, @NotNull @NotNull GuiFactory guiFactory)
      Creates a new instance.
      Parameters:
      tooltipManager - the tooltip manager to update
      facesManager - the faces to use to display
      elementListener - the element listener to notify
      name - the name of this element
      cellWidth - the width of cells
      cellHeight - the height of cells
      font - font to display with
      characterModel - what to list characters of
      guiFactory - the global GUI factory instance
  • Method Details

    • selectionChanged

      protected void selectionChanged(int selectedIndex)
      Description copied from class: GUIList
      Called whenever the selected list entry has changed.
      Specified by:
      selectionChanged in class GUIList<GUICharacter>
      Parameters:
      selectedIndex - the selected list entry
    • getTooltip

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

      protected void activeChanged()
      Description copied from class: ActivatableGUIElement
      Will be called whenever the active state has changed.
      Specified by:
      activeChanged in class ActivatableGUIElement
    • getCurrentCharacter

      @Nullable public @Nullable CharacterInformation getCurrentCharacter()
      Returns the currently selected character in the list.
      Returns:
      null if invalid index, else the character information
    • setCharacter

      public void setCharacter(@NotNull @NotNull String characterName)
      Selects an entry by character name.
      Parameters:
      characterName - the character name
    • notifyOpen

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