Crossfire JXClient, Trunk
|
Public Member Functions | |
void | dispose () |
GUIItemItem | getSelectedItem () |
void | mouseClicked (@NotNull final MouseEvent e) |
Public Member Functions inherited from com.realtime.crossfire.jxclient.gui.list.GUIList< T > | |
boolean | canMoveSelection (final int diffLines, final int diffElements) |
boolean | canScroll (final int distance) |
void | dispose () |
void | execute () |
T | getElement (final int index) |
Dimension | getMaximumSize () |
Dimension | getMinimumSize () |
Dimension | getPreferredSize () |
TooltipText | getTooltip () |
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 | mouseWheelMoved (final int wheelRotation) |
void | moveSelection (final int diffLines, final int diffElements) |
void | resetScroll () |
void | scroll (final int distance) |
void | setBounds (final int x, final int y, final int width, final int height) |
void | setChanged () |
Protected Member Functions | |
void | activeChanged () |
GUIItemList (@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final int cellWidth, final int cellHeight, @NotNull final ItemView itemView, @Nullable final AbstractLabel currentItem, @NotNull final GUIItemItem templateItem, @NotNull final GuiFactory guiFactory) | |
abstract T | newItem (final int index) |
void | selectionChanged (final int selectedIndex) |
Protected Member Functions inherited from com.realtime.crossfire.jxclient.gui.list.GUIList< T > | |
void | addElement ( @NotNull final T element) |
Object | getSelectedObject () |
abstract String | getTooltip (final int index) |
GUIList ( @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, final int cellWidth, final int cellHeight, @NotNull final GUIListCellRenderer< T > listCellRenderer, @Nullable final CommandList doubleClickCommandList, @NotNull final GuiFactory guiFactory) | |
int | resizeElements (final int newSize) |
void | selectionChanged () |
abstract void | selectionChanged (final int selectedIndex) |
void | setLayoutOrientation (final int layoutOrientation, final int visibleRowCount) |
void | setSelectedIndex (final int newIndex) |
Private Member Functions | |
void | button1Clicked (final int modifiers) |
void | button2Clicked (final int modifiers) |
void | button3Clicked (final int modifiers) |
void | rebuildList (@NotNull final Integer @Nullable[] changedSlots) |
void | setChanged (@NotNull final Integer @Nullable[] changedSlots, final int limit) |
void | setChanged (final int index) |
Private Attributes | |
final AbstractLabel | currentItem |
final GUIElementChangedListener | itemChangedListener |
final ItemView | itemView |
final LocationsListener | locationsListener = changedSlots -> SwingUtilities.invokeLater(() -> rebuildList(changedSlots)) |
Static Private Attributes | |
static final long | serialVersionUID = 1 |
A GUIList instance that displays GUIItemItem instances.
<T> | the type of the list elements |
Definition at line 46 of file GUIItemList.java.
|
protected |
Creates a new instance.
tooltipManager | the tooltip manager to update |
elementListener | the element listener to notify |
name | the name of this element |
cellWidth | the width of cells |
cellHeight | the height of cells |
itemView | the item view to monitor |
currentItem | the label to update with information about the selected item. |
templateItem | the template item for painting the list |
guiFactory | the global GUI factory instance |
Definition at line 94 of file GUIItemList.java.
|
protected |
Definition at line 179 of file GUIItemList.java.
|
private |
Called if the user has clicked the left mouse button.
modifiers | the active modifiers |
Definition at line 210 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.mouseClicked().
|
private |
Called if the user has clicked the middle mouse button.
modifiers | the active modifiers |
Definition at line 223 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.mouseClicked().
|
private |
Called if the user has clicked the right mouse button.
modifiers | the active modifiers |
Definition at line 236 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.mouseClicked().
void com.realtime.crossfire.jxclient.gui.list.GUIItemList< T extends GUIItemItem >.dispose | ( | ) |
Definition at line 104 of file GUIItemList.java.
GUIItemItem com.realtime.crossfire.jxclient.gui.list.GUIItemList< T extends GUIItemItem >.getSelectedItem | ( | ) |
Returns the selected GUIItemItem instance.
Definition at line 250 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.button1Clicked(), com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.button2Clicked(), com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.button3Clicked(), com.realtime.crossfire.jxclient.gui.commands.ExecSelectionCommand.canExecute(), and com.realtime.crossfire.jxclient.gui.commands.ExecSelectionCommand.execute().
void com.realtime.crossfire.jxclient.gui.list.GUIItemList< T extends GUIItemItem >.mouseClicked | ( | @NotNull final MouseEvent | e | ) |
Definition at line 183 of file GUIItemList.java.
|
abstractprotected |
Creates a new GUIElement instance.
index | the item inventory's index |
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.rebuildList().
|
private |
Rebuilds the list cells.
changedSlots | the changed slots; null
|
Definition at line 113 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.GUIItemList().
|
protected |
Definition at line 160 of file GUIItemList.java.
|
private |
Marks some slots as modified.
changedSlots | the slots to mark as modified; null
|
limit | the limit; only slots less than this index are affected |
Definition at line 137 of file GUIItemList.java.
|
private |
Marks one slot as modified.
index | the slot index |
Definition at line 155 of file GUIItemList.java.
|
private |
The label to update with information about the selected item.
Definition at line 63 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.GUIItemList(), and com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.selectionChanged().
|
private |
The GUIElementChangedListener attached to all GUIItemItem instances in the list.
Definition at line 76 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.rebuildList().
|
private |
The ItemView to monitor.
Definition at line 57 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.dispose(), com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.GUIItemList(), com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.rebuildList(), and com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.selectionChanged().
|
private |
The LocationsListener to be notified about changes.
Definition at line 69 of file GUIItemList.java.
Referenced by com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.dispose(), and com.realtime.crossfire.jxclient.gui.list.GUIItemList< GUIItemSpell >.GUIItemList().
|
staticprivate |
The serial version UID.
Definition at line 51 of file GUIItemList.java.