Class GUIMetaElementList

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

public class GUIMetaElementList extends GUIList<GUIMetaElement>
A GUIList that tracks a Metaserver instance.
See Also:
  • Constructor Details

    • GUIMetaElementList

      public GUIMetaElementList(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, int cellWidth, int cellHeight, @NotNull @NotNull MetaserverModel metaserverModel, @Nullable @Nullable Image image, @NotNull @NotNull Font font, @NotNull @NotNull String format, @NotNull @NotNull String tooltip, @Nullable @Nullable GUIText hostname, @Nullable @Nullable AbstractLabel comment, @NotNull @NotNull CommandList connectCommandList, @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 each cell
      cellHeight - the height of each cell
      metaserverModel - the metaserver model to track
      image - the image for drawing list entries
      font - the font for drawing list entries
      format - the format for drawing list entries
      tooltip - the tooltip format for drawing list entries
      hostname - the hostname input field to update; may be null
      comment - the comment field to update; may be null
      connectCommandList - the command list to connect to the server
      guiFactory - the global GUI factory instance
  • Method Details

    • dispose

      public void dispose()
      Description copied from interface: GUIElement
      Releases all allocated resources.
      Specified by:
      dispose in interface GUIElement
      Overrides:
      dispose in class GUIList<GUIMetaElement>
    • notifyOpen

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

      protected void activeChanged()
      Description copied from class: ActivatableGUIElement
      Will be called whenever the active state has changed.
      Specified by:
      activeChanged in class ActivatableGUIElement
    • 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<GUIMetaElement>
      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<GUIMetaElement>
      Parameters:
      index - the index to use
      Returns:
      the tooltip text
    • setSelectedHostname

      public void setSelectedHostname(@NotNull @NotNull String serverName)
      Select an entry by server name.
      Parameters:
      serverName - the server name