Crossfire JXClient, Trunk
|
Public Member Functions | |
void | dispose () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
TooltipText | getTooltip () |
void | setBounds (final int x, final int y, final int width, final int height) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement | |
int | getDialogBorderBottom () |
int | getDialogBorderLeft () |
int | getDialogBorderRight () |
int | getDialogBorderTop () |
String | getName () |
void | inhibitListeners () |
boolean | isDefault () |
boolean | isIgnore () |
void | mouseClicked (@NotNull final MouseEvent e) |
void | mouseDragged (@NotNull final MouseEvent e) |
void | mouseEntered (@NotNull final MouseEvent e) |
void | mouseExited (@NotNull final MouseEvent e) |
void | mouseMoved (@NotNull final MouseEvent e) |
void | mousePressed (@NotNull final MouseEvent e) |
void | mouseReleased (@NotNull final MouseEvent e) |
void | mouseWheelMoved (final int wheelRotation) |
void | setChanged () |
void | setChangedListener (@Nullable final GUIElementChangedListener changedListener) |
void | setDefault (final boolean isDefault) |
void | setIgnore () |
String | toString () |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.GUIElement | |
void | notifyOpen () |
Protected Member Functions | |
abstract String | getDescription (@Nullable T item) |
abstract Component | getListCellRendererComponent (@NotNull final JList<? extends T > list, @Nullable final T value, final int index, final boolean selected, final boolean cellHasFocus) |
GUIComboBox (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @Nullable final GUILabelLog label, @NotNull final GuiFactory guiFactory) | |
void | setSelectedItem (@NotNull final T item) |
void | updateModel (@Nullable final List< T > elements) |
void | updateSelectedItem () |
abstract void | updateSelectedItem (@Nullable final T item) |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement | |
AbstractGUIElement (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final boolean opaque, @NotNull final GuiFactory guiFactory) | |
TooltipText | newTooltipText (@Nullable final String tooltipText) |
void | tooltipChanged () |
Private Attributes | |
final ActionListener | actionListener = e -> updateSelectedItem() |
final JComboBox< T > | comboBox = new JComboBox<>(model) |
boolean | inhibitActionListener |
final GUILabelLog | label |
final DefaultComboBoxModel< T > | model = new DefaultComboBoxModel<>() |
Static Private Attributes | |
static final Pattern | PATTERN_BOLD_BEGIN = Pattern.compile("\\[b]") |
static final Pattern | PATTERN_BOLD_END = Pattern.compile("\\[/b]") |
static final long | serialVersionUID = 1 |
A GUIElement that displays a combo box.
<T> | the type of the entries of this list |
Definition at line 50 of file GUIComboBox.java.
|
protected |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
label | the label to update or null
|
guiFactory | the global GUI factory instance |
Definition at line 106 of file GUIComboBox.java.
void com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< T >.dispose | ( | ) |
Releases all allocated resources.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 117 of file GUIComboBox.java.
|
abstractprotected |
Returns the description for an item.
item | the item |
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.getTooltip(), and com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateSelectedItem().
|
abstractprotected |
Returns a Component that displays the
.
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 |
Dimension com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< T >.getMinimumSize | ( | ) |
Definition at line 129 of file GUIComboBox.java.
Dimension com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< T >.getPreferredSize | ( | ) |
Definition at line 123 of file GUIComboBox.java.
TooltipText com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< T >.getTooltip | ( | ) |
Returns the current tooltip text.
Reimplemented from com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.
Definition at line 235 of file GUIComboBox.java.
void com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< T >.setBounds | ( | final int | x, |
final int | y, | ||
final int | width, | ||
final int | height | ||
) |
Definition at line 135 of file GUIComboBox.java.
|
protected |
Updates the selected item.
item | the new selected item |
Definition at line 221 of file GUIComboBox.java.
|
protected |
Updates entries shown in the combo box.
elements | the new entries to show |
Definition at line 144 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateModel().
|
protected |
Called whenever the selected item has changed.
Definition at line 195 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateModel(), and com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateSelectedItem().
|
abstractprotected |
Will be called whenever the selected item has changed.
item | the selected item |
|
private |
The ActionListener for comboBox.
Definition at line 91 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.dispose(), and com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.GUIComboBox().
|
private |
The Swing component that implements the combo box.
Definition at line 85 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.dispose(), com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.getMinimumSize(), com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.getPreferredSize(), com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.getTooltip(), com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.GUIComboBox(), com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.setBounds(), com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.setSelectedItem(), and com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateSelectedItem().
|
private |
If set, ignores calls to actionListener.
Definition at line 96 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateModel(), and com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateSelectedItem().
|
private |
The GUILog to update or
.
Definition at line 79 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.GUIComboBox(), and com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateSelectedItem().
|
private |
The model for comboBox.
Definition at line 73 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.updateModel().
|
staticprivate |
A Pattern that matches "[b]".
Definition at line 61 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.getTooltip().
|
staticprivate |
A Pattern that matches "[/b]".
Definition at line 67 of file GUIComboBox.java.
Referenced by com.realtime.crossfire.jxclient.gui.combobox.GUIComboBox< Integer >.getTooltip().
|
staticprivate |
The serial version UID.
Definition at line 55 of file GUIComboBox.java.