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(classInfo == null ? value : classInfo.
getName());
138 return classInfo == null ?
"" : classInfo.
getMsg();
Listener for GUIElement related events.
final GUILabelLog label
The GUILog to update or.
String getName()
Returns the human readable race name.
GUIClassesComboBox(@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final Model model, @Nullable final GUILabelLog label)
Creates a new instance.
String getMsg()
Returns the long description.
A gui element implementing a static text field which may contain media tags.
String getDescription(@NotNull final String item)
Combines all model classes that are updated.
void updateModel()
Updates the combo box model to reflect the current class list of model.
A GUIComboBox that shows available classes for character creation.
void updateSelectedItem()
Called whenever the selected item has changed.
A GUIElement that displays a combo box.
One possible class or race for character creation.
final NewCharacterInformationListener newCharacterInformationListener
The NewCharacterInformationListener attached to model.
Component getListCellRendererComponent(@NotNull final JList<? extends String > list, @Nullable final String value, final int index, final boolean selected, final boolean cellHasFocus)
NewCharacterInformation getNewCharacterInformation()
Returns the NewCharacterInformation for creating new characters.
final Model model
The Model to track for available classes.
final JLabel renderer
The JLabel that displays the list values.
static final long serialVersionUID
The serial version UID.