Class GUIClassesComboBox

All Implemented Interfaces:
GUIElement, ImageObserver, MenuContainer, Serializable

public class GUIClassesComboBox extends GUIComboBox<String>
A GUIComboBox that shows available classes for character creation.
See Also:
  • Constructor Details

    • GUIClassesComboBox

      public GUIClassesComboBox(@NotNull @NotNull TooltipManager tooltipManager, @NotNull @NotNull GUIElementListener elementListener, @NotNull @NotNull String name, @NotNull @NotNull Model model, @NotNull @NotNull NewCharModel newCharModel, @Nullable @Nullable GUILabelLog label, @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
      model - the model to display
      newCharModel - the new char model to show
      label - the label to update or null
      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 GUIComboBox<String>
    • notifyOpen

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

      @NotNull protected @NotNull Component getListCellRendererComponent(@NotNull @NotNull JList<? extends String> list, @Nullable @Nullable String value, int index, boolean selected, boolean cellHasFocus)
      Description copied from class: GUIComboBox
      Returns a Component that displays the value.
      Specified by:
      getListCellRendererComponent in class GUIComboBox<String>
      Parameters:
      list - the list that contains the value
      value - the value that is displayed or null
      index - the list index
      selected - whether the value is selected
      cellHasFocus - whether the value has the focus
      Returns:
      the component to render the value
    • updateSelectedItem

      protected void updateSelectedItem(@Nullable @Nullable String item)
      Description copied from class: GUIComboBox
      Will be called whenever the selected item has changed.
      Specified by:
      updateSelectedItem in class GUIComboBox<String>
      Parameters:
      item - the selected item
    • getDescription

      @NotNull protected @NotNull String getDescription(@Nullable @Nullable String item)
      Description copied from class: GUIComboBox
      Returns the description for an item.
      Specified by:
      getDescription in class GUIComboBox<String>
      Parameters:
      item - the item
      Returns:
      the description