Crossfire JXClient, Trunk
GUIList.java
Go to the documentation of this file.
1 /*
2  * This file is part of JXClient, the Fullscreen Java Crossfire Client.
3  *
4  * JXClient is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * JXClient is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with JXClient; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * Copyright (C) 2005-2008 Yann Chachkoff
19  * Copyright (C) 2006-2017,2019-2023 Andreas Kirschbaum
20  * Copyright (C) 2010-2012,2014-2018,2020-2023 Nicolas Weeger
21  */
22 
23 package com.realtime.crossfire.jxclient.gui.list;
24 
35 import java.awt.Adjustable;
36 import java.awt.Dimension;
37 import java.awt.Point;
38 import java.awt.Rectangle;
39 import java.awt.event.MouseEvent;
40 import javax.swing.DefaultListModel;
41 import javax.swing.JList;
42 import javax.swing.JScrollPane;
43 import javax.swing.JViewport;
44 import javax.swing.ListSelectionModel;
45 import javax.swing.ScrollPaneConstants;
46 import javax.swing.border.EmptyBorder;
47 import javax.swing.event.ListSelectionListener;
48 import org.jetbrains.annotations.NotNull;
49 import org.jetbrains.annotations.Nullable;
50 
56 public abstract class GUIList<T extends GUIElement> extends ActivatableGUIElement implements GUIScrollable {
57 
61  private static final long serialVersionUID = 1;
62 
66  private final int cellHeight;
67 
71  @NotNull
73 
78  @Nullable
80 
84  @NotNull
85  private final GuiFactory guiFactory;
86 
90  @NotNull
91  private final DefaultListModel<T> model = new DefaultListModel<>();
92 
96  @NotNull
97  private final JList<T> list = new JList<>(model);
98 
102  @NotNull
103  private final GUIListViewport viewport = new GUIListViewport();
104 
108  @NotNull
109  private final JScrollPane scrollPane;
110 
115  private int tooltipIndex = -1;
116 
120  @Nullable
121  private Rectangle tooltipRectangle;
122 
126  @NotNull
127  private final ListSelectionListener listSelectionListener = e -> selectionChanged();
128 
141  protected 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) {
143  this.cellHeight = cellHeight;
144  this.listCellRenderer = listCellRenderer;
145  this.doubleClickCommandList = doubleClickCommandList;
146  this.guiFactory = guiFactory;
147 
148  list.setCellRenderer(listCellRenderer);
149  list.setFixedCellWidth(cellWidth);
150  list.setFixedCellHeight(cellHeight);
151  list.setOpaque(false);
152  list.setFocusable(false);
153  list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
154  list.addListSelectionListener(listSelectionListener);
155 
156  viewport.setView(list);
157  viewport.setScrollMode(JViewport.BLIT_SCROLL_MODE);
158  viewport.setOpaque(false);
159  viewport.setFocusable(false);
160 
161  scrollPane = new JScrollPane(null, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
162  scrollPane.setViewport(viewport);
163  scrollPane.setOpaque(false);
164  scrollPane.setFocusable(false);
165  scrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));
166 
167  add(scrollPane);
168 
169  listCellRenderer.setSize(getWidth(), cellHeight);
170  }
171 
172  @Override
173  public void dispose() {
174  super.dispose();
175  list.removeListSelectionListener(listSelectionListener);
176  synchronized (getTreeLock()) {
177  resizeElements(0);
178  }
179  }
180 
186  @NotNull
187  public T getElement(final int index) {
188  return model.get(index);
189  }
190 
195  protected void addElement(@NotNull final T element) {
196  assert Thread.holdsLock(getTreeLock());
197  model.addElement(element);
198  list.setSize(getWidth(), Integer.MAX_VALUE);
199  viewport.update();
200  if (model.getSize() == 1) {
201  setSelectedIndex(0);
202  }
203  }
204 
212  protected int resizeElements(final int newSize) {
213  assert Thread.holdsLock(getTreeLock());
214  final int index = list.getSelectedIndex();
215  final int oldSize = model.getSize();
216  if (newSize < oldSize) {
217  for (int i = newSize; i < oldSize; i++) {
218  final GUIElement element = model.get(i);
219  if (element instanceof GUIItemItem) {
220  element.dispose();
221  }
222  }
223  model.removeRange(newSize, oldSize-1);
224  list.setSize(getWidth(), Integer.MAX_VALUE);
225  if (index >= newSize && newSize > 0) {
226  setSelectedIndex(newSize-1);
227  }
228  setChanged();
229  }
230  return oldSize;
231  }
232 
239  public boolean canMoveSelection(final int diffLines, final int diffElements) {
240  synchronized (getTreeLock()) {
241  final int distance;
242  //noinspection SwitchStatementWithTooFewBranches
243  switch (list.getLayoutOrientation()) {
244  case JList.HORIZONTAL_WRAP:
245  distance = (list.getWidth()/cellHeight)*diffLines+diffElements;
246  break;
247 
248  default:
249  distance = diffLines+diffElements;
250  break;
251  }
252  final int index = list.getSelectedIndex();
253  if (distance > 0) {
254  return index == -1 || index+distance < list.getModel().getSize();
255  }
256  //noinspection SimplifiableIfStatement
257  if (distance < 0) {
258  return index == -1 || index >= -distance;
259  }
260  return false;
261  }
262  }
263 
269  public void moveSelection(final int diffLines, final int diffElements) {
270  synchronized (getTreeLock()) {
271  final int distance;
272  //noinspection SwitchStatementWithTooFewBranches
273  switch (list.getLayoutOrientation()) {
274  case JList.HORIZONTAL_WRAP:
275  distance = (list.getWidth()/cellHeight)*diffLines+diffElements;
276  break;
277 
278  default:
279  distance = diffLines+diffElements;
280  break;
281  }
282  final int index = list.getSelectedIndex();
283  final int newIndex;
284  if (distance > 0) {
285  newIndex = index == -1 ? 0 : Math.min(index+distance, list.getModel().getSize()-1);
286  } else if (distance < 0) {
287  //noinspection IfMayBeConditional
288  if (index == -1) {
289  newIndex = list.getModel().getSize()-1;
290  } else {
291  newIndex = Math.max(index+distance, 0);
292  }
293  } else {
294  newIndex = index == -1 ? 0 : index;
295  }
296  setSelectedIndex(newIndex);
297  }
298  }
299 
305  @Override
306  public boolean canScroll(final int distance) {
307  synchronized (getTreeLock()) {
308  final Adjustable scrollBar = scrollPane.getVerticalScrollBar();
309  if (distance > 0) {
310  return scrollBar.getValue() < scrollBar.getMaximum()-scrollBar.getVisibleAmount();
311  }
312  //noinspection SimplifiableIfStatement
313  if (distance < 0) {
314  return scrollBar.getValue() > scrollBar.getMinimum();
315  }
316  return false;
317  }
318  }
319 
324  @Override
325  public void scroll(final int distance) {
326  synchronized (getTreeLock()) {
327  final Adjustable scrollBar = scrollPane.getVerticalScrollBar();
328  final int value = scrollBar.getValue()+distance*cellHeight;
329  scrollBar.setValue(value);
330  final int index = list.getSelectedIndex();
331  if (index != -1) {
332  final int firstIndex = list.getFirstVisibleIndex();
333  if (index < firstIndex) {
334  //noinspection SwitchStatementWithTooFewBranches
335  switch (list.getLayoutOrientation()) {
336  case JList.HORIZONTAL_WRAP:
337  final int columns = list.getWidth()/cellHeight;
338  setSelectedIndex(firstIndex+index%columns);
339  break;
340 
341  default:
342  setSelectedIndex(firstIndex);
343  break;
344  }
345  } else {
346  final int lastIndex = list.getLastVisibleIndex();
347  if (index > lastIndex) {
348  //noinspection SwitchStatementWithTooFewBranches
349  switch (list.getLayoutOrientation()) {
350  case JList.HORIZONTAL_WRAP:
351  final int columns = list.getWidth()/cellHeight;
352  final int newTmpColumn = lastIndex-lastIndex%columns+index%columns;
353  final int newColumn;
354  if (newTmpColumn <= lastIndex) {
355  newColumn = newTmpColumn;
356  } else {
357  newColumn = newTmpColumn >= columns ? newTmpColumn-columns : lastIndex;
358  }
359  setSelectedIndex(newColumn);
360  break;
361 
362  default:
363  setSelectedIndex(lastIndex);
364  break;
365  }
366  }
367  }
368  }
369  }
370  setChanged();
371  }
372 
373  @Override
374  public void resetScroll() {
375  setSelectedIndex(0);
376  }
377 
378  @Override
379  public void mouseClicked(@NotNull final MouseEvent e) {
380  if (isEnabled()) {
381  doSelect(e);
382  if (doubleClickCommandList != null && e.getClickCount() > 1) {
384  }
385  }
386  super.mouseClicked(e);
387  }
388 
389  @Override
390  public void mouseEntered(@NotNull final MouseEvent e) {
391  super.mouseEntered(e);
392  if (isEnabled()) {
393  doTooltip(e);
394  }
395  }
396 
397  @Override
398  public void mouseExited(@NotNull final MouseEvent e) {
399  super.mouseExited(e);
400  if (isEnabled()) {
401  doTooltip(e);
402  }
403  }
404 
405  @Override
406  public void mousePressed(@NotNull final MouseEvent e) {
407  super.mousePressed(e);
408  if (isEnabled()) {
409  doSelect(e);
410  }
411  }
412 
413  @Override
414  public void mouseMoved(@NotNull final MouseEvent e) {
415  super.mouseMoved(e);
416  if (isEnabled()) {
417  doTooltip(e);
418  }
419  }
420 
421  @Override
422  public void mouseDragged(@NotNull final MouseEvent e) {
423  super.mouseDragged(e);
424  if (isEnabled()) {
425  doSelect(e);
426  }
427  }
428 
429  @Override
430  public void mouseWheelMoved(final int wheelRotation) {
431  super.mouseWheelMoved(wheelRotation);
432  scroll(wheelRotation);
433  }
434 
439  private void doSelect(@NotNull final MouseEvent e) {
440  synchronized (getTreeLock()) {
441  final Rec rec = getIndex(e);
442  if (rec != null) {
443  setSelectedIndex(rec.getIndex());
444  }
445  }
446  }
447 
452  private void doTooltip(@NotNull final MouseEvent e) {
453  synchronized (getTreeLock()) {
454  final Rec rec = getIndex(e);
455  if (rec == null) {
456  tooltipIndex = -1;
457  tooltipRectangle = null;
458  tooltipChanged();
459  return;
460  }
461 
462  tooltipIndex = rec.getIndex();
463  tooltipRectangle = rec.getRectangle();
464  tooltipChanged();
465  }
466  }
467 
473  @Nullable
474  private Rec getIndex(@NotNull final MouseEvent e) {
475  final Point point = e.getPoint();
476  final Point location = list.getLocation();
477  point.translate(-location.x, -location.y);
478 
479  final int index = list.locationToIndex(point);
480  if (index == -1) {
481  return null;
482  }
483 
484  final Rectangle rectangle = list.getCellBounds(index, index);
485  if (rectangle == null || !rectangle.contains(point)) {
486  return null;
487  }
488  rectangle.translate(location.x, location.y);
489 
490  return new Rec(index, rectangle);
491  }
492 
497  protected void setSelectedIndex(final int newIndex) {
498  synchronized (getTreeLock()) {
499  final int newIndex2 = Math.min(Math.max(newIndex, 0), list.getModel().getSize()-1);
500  final int index = list.getSelectedIndex();
501  if (newIndex2 == index) {
502  return;
503  }
504 
505  list.setSelectedIndex(newIndex2);
506  if (newIndex2 >= 0) {
507  list.ensureIndexIsVisible(newIndex2);
508  }
509  }
510  setChanged();
511  }
512 
516  protected void selectionChanged() {
517  synchronized (getTreeLock()) {
518  selectionChanged(list.getSelectedIndex());
519  }
520  }
521 
526  protected abstract void selectionChanged(final int selectedIndex);
527 
528  @Override
529  public void setChanged() {
530  super.setChanged();
531  tooltipChanged();
532  }
533 
534  @Nullable
535  @Override
537  if (tooltipIndex == -1) {
538  return null;
539  }
540 
541  final Rectangle rectangle = tooltipRectangle;
542  if (rectangle == null) {
543  return null;
544  }
545 
546  final Gui gui = guiFactory.getGui(this);
547  if (gui == null) {
548  tooltipIndex = -1;
549  tooltipRectangle = null;
550  return null;
551  }
552 
553  final String text = getTooltip(tooltipIndex);
554  return text == null ? null : new TooltipText(text, gui.getComponent().getX()+getX()+rectangle.x, gui.getComponent().getY()+getY()+rectangle.y, rectangle.width, rectangle.height);
555  }
556 
557  @Override
558  public void execute() {
559  // ignore
560  }
561 
567  @Nullable
568  protected abstract String getTooltip(final int index);
569 
576  protected void setLayoutOrientation(final int layoutOrientation, final int visibleRowCount) {
577  synchronized (getTreeLock()) {
578  list.setLayoutOrientation(layoutOrientation);
579  list.setVisibleRowCount(visibleRowCount);
580  }
581  }
582 
587  @NotNull
588  protected Object getSelectedObject() {
589  synchronized (getTreeLock()) {
590  return list.getSelectedValue();
591  }
592  }
593 
594  @Override
595  @SuppressWarnings("MethodDoesntCallSuperMethod")
596  public Dimension getPreferredSize() {
597  return new Dimension(64, 64);
598  }
599 
600  @Override
601  @SuppressWarnings("MethodDoesntCallSuperMethod")
602  public Dimension getMinimumSize() {
603  return list.getMinimumSize();
604  }
605 
606  @Override
607  @SuppressWarnings("MethodDoesntCallSuperMethod")
608  public Dimension getMaximumSize() {
609  return new Dimension(320, 160);
610  }
611 
612  @Override
613  public void setBounds(final int x, final int y, final int width, final int height) {
614  super.setBounds(x, y, width, height);
615  scrollPane.setSize(width, height);
617  }
618 
622  private static class Rec {
623 
627  private final int index;
628 
632  @NotNull
633  private final Rectangle rectangle;
634 
640  private Rec(final int index, @NotNull final Rectangle rectangle) {
641  this.index = index;
642  this.rectangle = rectangle;
643  }
644 
649  public int getIndex() {
650  return index;
651  }
652 
657  @NotNull
658  public Rectangle getRectangle() {
659  return rectangle;
660  }
661 
662  }
663 
664 }
com.realtime.crossfire.jxclient.gui.list.GUIList.getElement
T getElement(final int index)
Definition: GUIList.java:187
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name
final String name
Definition: AbstractGUIElement.java:77
com.realtime.crossfire.jxclient
com.realtime.crossfire.jxclient.skin.skin
Definition: DefaultJXCSkin.java:23
com.realtime.crossfire.jxclient.gui.gui.Gui
Definition: Gui.java:49
com.realtime.crossfire.jxclient.gui.list.GUIList.mouseDragged
void mouseDragged(@NotNull final MouseEvent e)
Definition: GUIList.java:422
com.realtime.crossfire.jxclient.gui.list.GUIList.resizeElements
int resizeElements(final int newSize)
Definition: GUIList.java:212
com.realtime.crossfire.jxclient.gui.list.GUIList.setLayoutOrientation
void setLayoutOrientation(final int layoutOrientation, final int visibleRowCount)
Definition: GUIList.java:576
com.realtime.crossfire.jxclient.gui.commandlist.CommandList
Definition: CommandList.java:34
com.realtime.crossfire.jxclient.gui.list.GUIList.getSelectedObject
Object getSelectedObject()
Definition: GUIList.java:588
com.realtime.crossfire.jxclient.gui.list.GUIList.list
final JList< T > list
Definition: GUIList.java:97
com.realtime.crossfire.jxclient.gui.list.GUIList.Rec.rectangle
final Rectangle rectangle
Definition: GUIList.java:633
com.realtime.crossfire.jxclient.skin
com.realtime.crossfire.jxclient.gui.list.GUIList.getMinimumSize
Dimension getMinimumSize()
Definition: GUIList.java:602
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement
Definition: ActivatableGUIElement.java:33
com.realtime.crossfire.jxclient.gui.list.GUIList.listSelectionListener
final ListSelectionListener listSelectionListener
Definition: GUIList.java:127
com.realtime.crossfire.jxclient.skin.skin.GuiFactory
Definition: GuiFactory.java:41
com.realtime.crossfire.jxclient.gui.list.GUIList.serialVersionUID
static final long serialVersionUID
Definition: GUIList.java:61
com.realtime.crossfire.jxclient.gui.commandlist
Definition: CommandList.java:23
com.realtime.crossfire.jxclient.gui.list.GUIList.doTooltip
void doTooltip(@NotNull final MouseEvent e)
Definition: GUIList.java:452
com.realtime.crossfire.jxclient.gui.list.GUIList.Rec.index
final int index
Definition: GUIList.java:627
com.realtime.crossfire.jxclient.gui.list.GUIList.guiFactory
final GuiFactory guiFactory
Definition: GUIList.java:85
com.realtime.crossfire.jxclient.gui.list.GUIList.cellHeight
final int cellHeight
Definition: GUIList.java:66
com.realtime.crossfire.jxclient.gui.list.GUIList.GUIList
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)
Definition: GUIList.java:141
com.realtime.crossfire.jxclient.gui.list.GUIList.viewport
final GUIListViewport viewport
Definition: GUIList.java:103
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipChanged
void tooltipChanged()
Definition: AbstractGUIElement.java:265
com.realtime.crossfire.jxclient.gui.list.GUIListViewport
Definition: GUIListViewport.java:31
com.realtime.crossfire.jxclient.gui.list.GUIList.moveSelection
void moveSelection(final int diffLines, final int diffElements)
Definition: GUIList.java:269
com.realtime.crossfire.jxclient.gui.list.GUIList.getTooltip
TooltipText getTooltip()
Definition: GUIList.java:536
com.realtime.crossfire.jxclient.gui.list.GUIList.getMaximumSize
Dimension getMaximumSize()
Definition: GUIList.java:608
com.realtime.crossfire.jxclient.gui.list.GUIList.tooltipRectangle
Rectangle tooltipRectangle
Definition: GUIList.java:121
com.realtime.crossfire.jxclient.gui.list.GUIList.doSelect
void doSelect(@NotNull final MouseEvent e)
Definition: GUIList.java:439
com.realtime.crossfire.jxclient.skin.skin.GuiFactory.getGui
Gui getGui(@NotNull final AbstractGUIElement element)
Definition: GuiFactory.java:110
com.realtime.crossfire.jxclient.gui.list.GUIList.scroll
void scroll(final int distance)
Definition: GUIList.java:325
com.realtime.crossfire.jxclient.gui.list.GUIList.getIndex
Rec getIndex(@NotNull final MouseEvent e)
Definition: GUIList.java:474
com.realtime.crossfire.jxclient.gui.item.GUIItemItem
Definition: GUIItemItem.java:46
com.realtime.crossfire.jxclient.gui.list.GUIList.mouseMoved
void mouseMoved(@NotNull final MouseEvent e)
Definition: GUIList.java:414
com.realtime.crossfire.jxclient.gui.list.GUIListCellRenderer<? extends T >
com.realtime.crossfire.jxclient.gui.gui.Gui.getComponent
JComponent getComponent()
Definition: Gui.java:161
com.realtime.crossfire.jxclient.gui.list.GUIList.Rec.getIndex
int getIndex()
Definition: GUIList.java:649
com.realtime.crossfire.jxclient.gui.list.GUIList.Rec.getRectangle
Rectangle getRectangle()
Definition: GUIList.java:658
com.realtime.crossfire.jxclient.gui.list.GUIList.mousePressed
void mousePressed(@NotNull final MouseEvent e)
Definition: GUIList.java:406
com.realtime.crossfire.jxclient.gui
com.realtime.crossfire.jxclient.gui.list.GUIList.setSelectedIndex
void setSelectedIndex(final int newIndex)
Definition: GUIList.java:497
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener
final GUIElementListener elementListener
Definition: ActivatableGUIElement.java:44
com.realtime.crossfire.jxclient.gui.list.GUIList.mouseExited
void mouseExited(@NotNull final MouseEvent e)
Definition: GUIList.java:398
com.realtime.crossfire.jxclient.gui.list.GUIList.resetScroll
void resetScroll()
Definition: GUIList.java:374
com.realtime.crossfire.jxclient.gui.commandlist.CommandList.execute
void execute()
Definition: CommandList.java:99
com.realtime.crossfire.jxclient.gui.list.GUIList.canScroll
boolean canScroll(final int distance)
Definition: GUIList.java:306
com.realtime.crossfire.jxclient.gui.list.GUIList.setChanged
void setChanged()
Definition: GUIList.java:529
com.realtime.crossfire.jxclient.gui.gui.TooltipManager
Definition: TooltipManager.java:33
com.realtime.crossfire.jxclient.gui.list.GUIList.mouseClicked
void mouseClicked(@NotNull final MouseEvent e)
Definition: GUIList.java:379
com.realtime.crossfire.jxclient.gui.gui.GUIElement
Definition: GUIElement.java:33
com.realtime.crossfire.jxclient.gui.list.GUIList.canMoveSelection
boolean canMoveSelection(final int diffLines, final int diffElements)
Definition: GUIList.java:239
com.realtime.crossfire.jxclient.gui.list.GUIList.setBounds
void setBounds(final int x, final int y, final int width, final int height)
Definition: GUIList.java:613
com.realtime.crossfire.jxclient.gui.list.GUIList
Definition: GUIList.java:56
com.realtime.crossfire.jxclient.gui.gui.GUIElement.dispose
void dispose()
com.realtime.crossfire.jxclient.gui.scrollable.GUIScrollable
Definition: GUIScrollable.java:32
com.realtime.crossfire.jxclient.gui.list.GUIListCellRenderer.setSize
void setSize(final int width, int height)
com.realtime.crossfire.jxclient.gui.gui
Definition: AbstractGUIElement.java:23
com.realtime.crossfire.jxclient.gui.list.GUIList.mouseEntered
void mouseEntered(@NotNull final MouseEvent e)
Definition: GUIList.java:390
com.realtime.crossfire.jxclient.gui.list.GUIList.execute
void execute()
Definition: GUIList.java:558
com.realtime.crossfire.jxclient.gui.gui.TooltipText
Definition: TooltipText.java:31
com.realtime.crossfire
com.realtime.crossfire.jxclient.gui.list.GUIList.selectionChanged
void selectionChanged()
Definition: GUIList.java:516
com.realtime.crossfire.jxclient.gui.list.GUIListViewport.update
void update()
Definition: GUIListViewport.java:41
com.realtime
com.realtime.crossfire.jxclient.gui.scrollable
Definition: GUIScrollable.java:23
com.realtime.crossfire.jxclient.gui.list.GUIList.getPreferredSize
Dimension getPreferredSize()
Definition: GUIList.java:596
com
com.realtime.crossfire.jxclient.gui.item
Definition: GUIItem.java:23
com.realtime.crossfire.jxclient.gui.list.GUIList.doubleClickCommandList
final CommandList doubleClickCommandList
Definition: GUIList.java:79
com.realtime.crossfire.jxclient.gui.list.GUIList.dispose
void dispose()
Definition: GUIList.java:173
com.realtime.crossfire.jxclient.gui.list.GUIList.Rec
Definition: GUIList.java:622
com.realtime.crossfire.jxclient.gui.list.GUIList.addElement
void addElement(@NotNull final T element)
Definition: GUIList.java:195
com.realtime.crossfire.jxclient.gui.list.GUIList.scrollPane
final JScrollPane scrollPane
Definition: GUIList.java:109
com.realtime.crossfire.jxclient.gui.list.GUIList.listCellRenderer
final GUIListCellRenderer<? extends T > listCellRenderer
Definition: GUIList.java:72
com.realtime.crossfire.jxclient.gui.list.GUIList.tooltipIndex
int tooltipIndex
Definition: GUIList.java:115
com.realtime.crossfire.jxclient.gui.list.GUIList.mouseWheelMoved
void mouseWheelMoved(final int wheelRotation)
Definition: GUIList.java:430
com.realtime.crossfire.jxclient.gui.gui.GUIElementListener
Definition: GUIElementListener.java:32
com.realtime.crossfire.jxclient.gui.list.GUIList.Rec.Rec
Rec(final int index, @NotNull final Rectangle rectangle)
Definition: GUIList.java:640
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager
final TooltipManager tooltipManager
Definition: AbstractGUIElement.java:83
com.realtime.crossfire.jxclient.gui.list.GUIList.model
final DefaultListModel< T > model
Definition: GUIList.java:91