22 package com.realtime.crossfire.jxclient.gui.combobox;
30 import java.awt.Component;
31 import javax.swing.JLabel;
32 import javax.swing.JList;
33 import org.jetbrains.annotations.NotNull;
34 import org.jetbrains.annotations.Nullable;
66 public void classListChanged() {
71 public void classInfoChanged(@NotNull
final String className) {
76 public void raceListChanged() {
81 public void raceInfoChanged(@NotNull
final String raceName) {
96 super(tooltipManager, elementListener, name, label);
125 protected Component
getListCellRendererComponent(@NotNull
final JList<? extends String> list, @Nullable
final String value,
final int index,
final boolean selected,
final boolean cellHasFocus) {
127 renderer.setText(raceInfo == null ? value : raceInfo.
getName());
138 return classInfo == null ?
"" : classInfo.
getMsg();
Listener for GUIElement related events.
static final long serialVersionUID
The serial version UID.
final GUILabelLog label
The GUILog to update or.
A GUIComboBox that shows available races for character creation.
String getName()
Returns the human readable race name.
final JLabel renderer
The JLabel that displays the list values.
String getMsg()
Returns the long description.
Component getListCellRendererComponent(@NotNull final JList<? extends String > list, @Nullable final String value, final int index, final boolean selected, final boolean cellHasFocus)
String getDescription(@NotNull final String item)
A gui element implementing a static text field which may contain media tags.
final Model model
The Model to track for available races.
Combines all model classes that are updated.
final NewCharacterInformationListener newCharacterInformationListener
The NewCharacterInformationListener attached to model.
void updateSelectedItem()
Called whenever the selected item has changed.
void updateModel()
Updates the combo box model to reflect the current race list of model.
A GUIElement that displays a combo box.
One possible class or race for character creation.
GUIRacesComboBox(@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final Model model, @Nullable final GUILabelLog label)
Creates a new instance.
NewCharacterInformation getNewCharacterInformation()
Returns the NewCharacterInformation for creating new characters.