Crossfire JXClient, Trunk
GUIText.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.textinput;
24 
34 import java.awt.Color;
35 import java.awt.Dimension;
36 import java.awt.Font;
37 import java.awt.Graphics;
38 import java.awt.Graphics2D;
39 import java.awt.Image;
40 import java.awt.Toolkit;
41 import java.awt.datatransfer.Clipboard;
42 import java.awt.datatransfer.DataFlavor;
43 import java.awt.datatransfer.StringSelection;
44 import java.awt.datatransfer.Transferable;
45 import java.awt.datatransfer.UnsupportedFlavorException;
46 import java.awt.event.KeyEvent;
47 import java.awt.event.MouseEvent;
48 import java.awt.font.FontRenderContext;
49 import java.awt.geom.RectangularShape;
50 import java.io.IOException;
51 import org.jetbrains.annotations.NotNull;
52 import org.jetbrains.annotations.Nullable;
53 
61 public abstract class GUIText extends ActivatableGUIElement implements KeyPressedHandler {
62 
66  private static final long serialVersionUID = 1;
67 
72  private static final int SCROLL_CHARS = 8;
73 
77  @NotNull
79 
84  @Nullable
86 
90  @NotNull
91  private final NewCharModel newCharModel;
92 
96  @NotNull
97  private final Image activeImage;
98 
102  @NotNull
103  private final Image inactiveImage;
104 
108  @NotNull
109  private final Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
110 
115  @Nullable
116  private final Clipboard selection = Toolkit.getDefaultToolkit().getSystemSelection();
117 
121  @NotNull
122  private final Font font;
123 
128  @NotNull
129  private final Color inactiveColor;
130 
135  @NotNull
136  private final Color activeColor;
137 
141  private final int margin;
142 
146  @NotNull
147  private final StringBuilder text;
148 
152  private final Dimension preferredSize;
153 
157  private boolean hideInput;
158 
162  private int cursor;
163 
167  private int offset;
168 
173  @NotNull
174  private final Object syncCursor = new Object();
175 
196  protected GUIText(@NotNull final CommandCallback commandCallback, @Nullable final CommandHistory commandHistory, @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final NewCharModel newCharModel, @NotNull final Image activeImage, @NotNull final Image inactiveImage, @NotNull final Font font, @NotNull final Color inactiveColor, @NotNull final Color activeColor, final int margin, @NotNull final String text, @NotNull final GuiFactory guiFactory) {
198  this.commandCallback = commandCallback;
199  this.commandHistory = commandHistory;
200  this.newCharModel = newCharModel;
201  this.activeImage = activeImage;
202  this.inactiveImage = inactiveImage;
203  this.font = font;
204  this.inactiveColor = inactiveColor;
205  this.activeColor = activeColor;
206  this.margin = margin;
207  this.text = new StringBuilder(text);
208  preferredSize = new Dimension(activeImage.getWidth(null), activeImage.getHeight(null));
209  if (!preferredSize.equals(new Dimension(inactiveImage.getWidth(null), inactiveImage.getHeight(null)))) {
210  throw new IllegalArgumentException("active image size differs from inactive image size");
211  }
212  setCursor(this.text.length());
213  if (name.equals("account_character_create")) {
214  setChangedListener(this::updateErrorText);
215  updateErrorText();
216  }
217  }
218 
223  public void setText(@NotNull final String text) {
224  this.text.setLength(0);
225  this.text.append(text);
226  setCursor(this.text.length());
227  }
228 
233  @NotNull
234  public String getText() {
235  return text.toString();
236  }
237 
238  @Override
239  public void paintComponent(@NotNull final Graphics g) {
240  super.paintComponent(g);
241 
242  final Graphics2D g2 = (Graphics2D)g;
243  final Image image = isActive() ? activeImage : inactiveImage;
244  for (int x = 0; x < getWidth(); x += image.getWidth(null)) {
245  g2.drawImage(image, x, 0, null);
246  }
247  g2.setFont(font);
248  final String tmp;
249  final int y;
250  synchronized (syncCursor) {
251  tmp = getDisplayText();
252  final FontRenderContext fontRenderContext = g2.getFontRenderContext();
253  final RectangularShape rectangle = font.getStringBounds(tmp, fontRenderContext);
254  y = (int)Math.round(getHeight()-rectangle.getMaxY()-rectangle.getMinY())/2;
255  if (isActive()) {
256  final String tmpPrefix = tmp.substring(0, cursor-offset);
257  final String tmpCursor = tmp.substring(0, cursor-offset+1);
258  final RectangularShape rectanglePrefix = font.getStringBounds(tmpPrefix, fontRenderContext);
259  final RectangularShape rectangleCursor = font.getStringBounds(tmpCursor, fontRenderContext);
260  final int cursorX1 = (int)Math.round(rectanglePrefix.getWidth());
261  final int cursorX2 = (int)Math.round(rectangleCursor.getWidth());
262  g2.setColor(inactiveColor);
263  g2.fillRect(margin+cursorX1, 0, cursorX2-cursorX1, getHeight());
264  }
265  }
266  g2.setColor(isActive() ? activeColor : inactiveColor);
267  g2.drawString(tmp, margin, y);
268  }
269 
270  @NotNull
271  @Override
272  @SuppressWarnings("MethodDoesntCallSuperMethod")
273  public Dimension getPreferredSize() {
274  return new Dimension(preferredSize);
275  }
276 
277  @NotNull
278  @Override
279  @SuppressWarnings("MethodDoesntCallSuperMethod")
280  public Dimension getMinimumSize() {
281  return new Dimension(preferredSize);
282  }
283 
284  @NotNull
285  @Override
286  @SuppressWarnings("MethodDoesntCallSuperMethod")
287  public Dimension getMaximumSize() {
288  return new Dimension(preferredSize);
289  }
290 
298  @NotNull
299  private String getDisplayText() {
300  final String tmpText = text.substring(offset);
301  if (!hideInput) {
302  return tmpText+" ";
303  }
304 
305  final String template = "****************************************************************************************************************************************************************";
306  final String hiddenText = template.substring(0, Math.min(tmpText.length(), template.length()));
307  return hiddenText+" ";
308  }
309 
310  @Override
311  public void mouseClicked(@NotNull final MouseEvent e) {
312  super.mouseClicked(e);
313 
314  if (!isEnabled()) {
315  return;
316  }
317 
318  final int b = e.getButton();
319  switch (b) {
320  case MouseEvent.BUTTON1:
321  setActive(true);
322  setChanged();
323  break;
324 
325  case MouseEvent.BUTTON2:
326  break;
327 
328  case MouseEvent.BUTTON3:
329  break;
330  }
331  }
332 
333  @Override
334  protected void activeChanged() {
335  setChanged();
336  }
337 
338  @Override
339  public boolean keyPressed(@NotNull final KeyEvent2 e) {
340  if (!isEnabled()) {
341  return false;
342  }
343 
344  switch (e.getKeyCode()) {
345  case KeyEvent.VK_ENTER:
347  final String command = text.toString();
349  execute(command);
350  if (!hideInput && commandHistory != null) {
351  commandHistory.addCommand(command);
352  }
354  return true;
355 
356  case KeyEvent.VK_BACK_SPACE:
357  synchronized (syncCursor) {
358  if (cursor > 0) {
359  text.delete(cursor-1, cursor);
360  setCursor(cursor-1);
361  }
362  }
363  return true;
364 
365  case KeyEvent.VK_DELETE:
366  synchronized (syncCursor) {
367  if (cursor < text.length()) {
368  text.delete(cursor, cursor+1);
369  setChanged();
370  }
371  }
372  return true;
373 
374  case KeyEvent.VK_KP_LEFT:
375  case KeyEvent.VK_LEFT:
376  synchronized (syncCursor) {
377  if (cursor > 0) {
378  setCursor(cursor-1);
379  }
380  }
381  return true;
382 
383  case KeyEvent.VK_KP_RIGHT:
384  case KeyEvent.VK_RIGHT:
385  synchronized (syncCursor) {
386  if (cursor < text.length()) {
387  setCursor(cursor+1);
388  }
389  }
390  return true;
391 
392  case KeyEvent.VK_KP_UP:
393  case KeyEvent.VK_UP:
394  if (historyPrev()) {
395  return true;
396  }
397  break;
398 
399  case KeyEvent.VK_KP_DOWN:
400  case KeyEvent.VK_DOWN:
401  if (historyNext()) {
402  return true;
403  }
404  break;
405 
406  case KeyEvent.VK_HOME:
407  synchronized (syncCursor) {
408  if (cursor > 0) {
409  setCursor(0);
410  }
411  }
412  return true;
413 
414  case KeyEvent.VK_END:
415  synchronized (syncCursor) {
416  if (cursor < text.length()) {
417  setCursor(text.length());
418  }
419  }
420  return true;
421 
422  case KeyEvent.VK_C: // CTRL-C
423  if ((e.getModifiers()&KeyEvent2.MASK) == KeyEvent2.CTRL) {
424  copy();
425  return true;
426  }
427  break;
428 
429  case KeyEvent.VK_N: // CTRL-N
430  if ((e.getModifiers()&KeyEvent2.MASK) == KeyEvent2.CTRL && historyNext()) {
431  return true;
432  }
433  break;
434 
435  case KeyEvent.VK_P: // CTRL-P
436  if ((e.getModifiers()&KeyEvent2.MASK) == KeyEvent2.CTRL && historyPrev()) {
437  return true;
438  }
439  break;
440 
441  case KeyEvent.VK_V: // CTRL-V
442  if ((e.getModifiers()&KeyEvent2.MASK) == KeyEvent2.CTRL) {
443  paste();
444  return true;
445  }
446  break;
447  }
448 
449  final char ch = e.getKeyChar();
450  if (ch != KeyEvent.CHAR_UNDEFINED && ch != (char)127 && ch >= ' ') {
451  insertChar(ch);
452  return true;
453  }
454 
455  return false;
456  }
457 
462  private boolean historyPrev() {
463  if (commandHistory == null) {
464  return false;
465  }
466  final String commandUp = commandHistory.up();
467  if (commandUp != null) {
468  setText(commandUp);
469  }
470  return true;
471  }
472 
477  private boolean historyNext() {
478  if (commandHistory == null) {
479  return false;
480  }
481  final String commandDown = commandHistory.down();
482  setText(commandDown == null ? "" : commandDown);
483  return true;
484  }
485 
490  private void insertChar(final char ch) {
491  synchronized (syncCursor) {
492  text.insert(cursor, ch);
493  setCursor(cursor+1);
494  }
495  }
496 
501  private void insertString(@NotNull final String str) {
502  synchronized (syncCursor) {
503  text.insert(cursor, str);
504  setCursor(cursor+str.length());
505  }
506  }
507 
512  protected abstract void execute(@NotNull final String command);
513 
518  public void setHideInput(final boolean hideInput) {
519  if (this.hideInput != hideInput) {
520  this.hideInput = hideInput;
521  setChanged();
522  }
523  }
524 
529  private void setCursor(final int cursor) {
530  synchronized (syncCursor) {
531  //noinspection StatementWithEmptyBody
532  if (getGraphics() == null) { // XXX: hack
533  // ignore
534  } else if (this.cursor < cursor) {
535  // cursor moved right
536 
537  while (true) {
538  final String tmp = getDisplayText();
539  final String tmpCursor = tmp.substring(0, cursor-offset+1);
540  //final RectangularShape rectangleCursor = font.getStringBounds(tmpCursor, fontRenderContext);
541  final Dimension dimension = GuiUtils.getTextDimension(tmpCursor, getFontMetrics(font));
542  //final int cursorX = (int)Math.round(rectangleCursor.getWidth());
543  final int cursorX = dimension.width;
544  if (cursorX < getWidth()) {
545  break;
546  }
547 
548  if (offset+SCROLL_CHARS > cursor) {
549  offset = cursor;
550  break;
551  }
552 
553  offset += SCROLL_CHARS;
554  }
555  } else if (this.cursor > cursor) {
556  // cursor moved left
557 
558  while (cursor < offset) {
559  if (offset <= SCROLL_CHARS) {
560  offset = 0;
561  break;
562  }
563 
564  offset -= SCROLL_CHARS;
565  }
566  }
567 
568  this.cursor = cursor;
569  }
570  setChanged();
571  }
572 
576  private void copy() {
577  final Transferable selection = new StringSelection(text.toString());
578  if (this.selection != null) {
579  this.selection.setContents(selection, null);
580  }
581  clipboard.setContents(selection, null);
582  }
583 
587  private void paste() {
588  Transferable content = null;
589  if (selection != null) {
590  content = selection.getContents(this);
591  }
592  if (content == null) {
593  content = clipboard.getContents(this);
594  }
595  if (content == null) {
596  return;
597  }
598 
599  final String str;
600  try {
601  str = (String)content.getTransferData(DataFlavor.stringFlavor);
602  } catch (final IOException|UnsupportedFlavorException ignored) {
603  return;
604  }
605  insertString(str);
606  }
607 
612  private void updateErrorText() {
613  final String name = text.toString();
614  @Nullable final String text;
615  if (name.isEmpty()) {
616  text = "The character name must not be empty.";
617  } else if (name.length() > 255) {
618  text = "The character name is too long.";
619  } else {
620  text = null;
621  }
623  }
624 
625 }
com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.updatePlayerName
void updatePlayerName(@NotNull String playerName)
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.name
final String name
Definition: AbstractGUIElement.java:77
com.realtime.crossfire.jxclient.gui.label.NewCharModel.PRIORITY_CHARACTER_NAME
static final int PRIORITY_CHARACTER_NAME
Definition: NewCharModel.java:94
com.realtime.crossfire.jxclient
com.realtime.crossfire.jxclient.skin.skin
Definition: DefaultJXCSkin.java:23
com.realtime.crossfire.jxclient.gui.keybindings.KeyEvent2
Definition: KeyEvent2.java:34
com.realtime.crossfire.jxclient.gui.textinput.GUIText.preferredSize
final Dimension preferredSize
Definition: GUIText.java:152
com.realtime.crossfire.jxclient.gui.textinput.GUIText.historyPrev
boolean historyPrev()
Definition: GUIText.java:462
com.realtime.crossfire.jxclient.gui.keybindings.KeyEvent2.MASK
static final int MASK
Definition: KeyEvent2.java:69
com.realtime.crossfire.jxclient.gui.textinput.GUIText.activeImage
final Image activeImage
Definition: GUIText.java:97
com.realtime.crossfire.jxclient.gui.textinput.GUIText.activeChanged
void activeChanged()
Definition: GUIText.java:334
com.realtime.crossfire.jxclient.gui.textinput.GUIText.inactiveColor
final Color inactiveColor
Definition: GUIText.java:129
com.realtime.crossfire.jxclient.gui.textinput.GUIText.hideInput
boolean hideInput
Definition: GUIText.java:157
com.realtime.crossfire.jxclient.gui.textinput.GUIText.cursor
int cursor
Definition: GUIText.java:162
com.realtime.crossfire.jxclient.gui.textinput.GUIText.newCharModel
final NewCharModel newCharModel
Definition: GUIText.java:91
com.realtime.crossfire.jxclient.skin
com.realtime.crossfire.jxclient.gui.textinput.GUIText.paintComponent
void paintComponent(@NotNull final Graphics g)
Definition: GUIText.java:239
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement
Definition: ActivatableGUIElement.java:33
com.realtime.crossfire.jxclient.gui.textinput.GUIText.getPreferredSize
Dimension getPreferredSize()
Definition: GUIText.java:273
com.realtime.crossfire.jxclient.settings.CommandHistory
Definition: CommandHistory.java:35
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.setInactiveIfPending
void setInactiveIfPending()
Definition: ActivatableGUIElement.java:105
com.realtime.crossfire.jxclient.gui.label
Definition: AbstractLabel.java:23
com.realtime.crossfire.jxclient.settings.CommandHistory.addCommand
void addCommand(@NotNull final String command)
Definition: CommandHistory.java:64
com.realtime.crossfire.jxclient.skin.skin.GuiFactory
Definition: GuiFactory.java:41
com.realtime.crossfire.jxclient.gui.gui.GuiUtils.getTextDimension
static Dimension getTextDimension(@NotNull final String text, @NotNull final FontMetrics fontMetrics)
Definition: GuiUtils.java:50
com.realtime.crossfire.jxclient.gui.textinput.GUIText.getMinimumSize
Dimension getMinimumSize()
Definition: GUIText.java:280
com.realtime.crossfire.jxclient.gui.keybindings.KeyEvent2.CTRL
static final int CTRL
Definition: KeyEvent2.java:54
com.realtime.crossfire.jxclient.gui.textinput.GUIText.GUIText
GUIText(@NotNull final CommandCallback commandCallback, @Nullable final CommandHistory commandHistory, @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final NewCharModel newCharModel, @NotNull final Image activeImage, @NotNull final Image inactiveImage, @NotNull final Font font, @NotNull final Color inactiveColor, @NotNull final Color activeColor, final int margin, @NotNull final String text, @NotNull final GuiFactory guiFactory)
Definition: GUIText.java:196
com.realtime.crossfire.jxclient.gui.gui.GuiUtils
Definition: GuiUtils.java:34
com.realtime.crossfire.jxclient.gui.keybindings
Definition: InvalidKeyBindingException.java:23
com.realtime.crossfire.jxclient.gui.textinput.CommandCallback
Definition: CommandCallback.java:33
com.realtime.crossfire.jxclient.settings
Definition: CommandHistory.java:23
com.realtime.crossfire.jxclient.gui.textinput.GUIText.font
final Font font
Definition: GUIText.java:122
com.realtime.crossfire.jxclient.gui.textinput.GUIText.setCursor
void setCursor(final int cursor)
Definition: GUIText.java:529
com.realtime.crossfire.jxclient.settings.CommandHistory.up
String up()
Definition: CommandHistory.java:109
com.realtime.crossfire.jxclient.gui.textinput.GUIText.text
final StringBuilder text
Definition: GUIText.java:147
com.realtime.crossfire.jxclient.gui.textinput.GUIText.margin
final int margin
Definition: GUIText.java:141
com.realtime.crossfire.jxclient.gui.textinput.GUIText.activeColor
final Color activeColor
Definition: GUIText.java:136
com.realtime.crossfire.jxclient.gui.textinput.GUIText.mouseClicked
void mouseClicked(@NotNull final MouseEvent e)
Definition: GUIText.java:311
com.realtime.crossfire.jxclient.gui.textinput.GUIText.offset
int offset
Definition: GUIText.java:167
com.realtime.crossfire.jxclient.gui.textinput.GUIText.serialVersionUID
static final long serialVersionUID
Definition: GUIText.java:66
com.realtime.crossfire.jxclient.gui.textinput.GUIText.copy
void copy()
Definition: GUIText.java:576
com.realtime.crossfire.jxclient.gui.gui.KeyPressedHandler
Definition: KeyPressedHandler.java:32
com.realtime.crossfire.jxclient.gui.textinput.GUIText.getText
String getText()
Definition: GUIText.java:234
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.markInactivePending
void markInactivePending()
Definition: ActivatableGUIElement.java:98
com.realtime.crossfire.jxclient.gui
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.elementListener
final GUIElementListener elementListener
Definition: ActivatableGUIElement.java:44
com.realtime.crossfire.jxclient.gui.textinput.GUIText.insertString
void insertString(@NotNull final String str)
Definition: GUIText.java:501
com.realtime.crossfire.jxclient.gui.textinput.GUIText.updateErrorText
void updateErrorText()
Definition: GUIText.java:612
com.realtime.crossfire.jxclient.gui.textinput.GUIText.commandCallback
final CommandCallback commandCallback
Definition: GUIText.java:78
com.realtime.crossfire.jxclient.gui.textinput.GUIText.inactiveImage
final Image inactiveImage
Definition: GUIText.java:103
com.realtime.crossfire.jxclient.gui.textinput.GUIText.paste
void paste()
Definition: GUIText.java:587
com.realtime.crossfire.jxclient.gui.textinput.GUIText.clipboard
final Clipboard clipboard
Definition: GUIText.java:109
com.realtime.crossfire.jxclient.gui.textinput.GUIText.getMaximumSize
Dimension getMaximumSize()
Definition: GUIText.java:287
com.realtime.crossfire.jxclient.gui.gui.TooltipManager
Definition: TooltipManager.java:33
com.realtime.crossfire.jxclient.gui.textinput.GUIText.setHideInput
void setHideInput(final boolean hideInput)
Definition: GUIText.java:518
com.realtime.crossfire.jxclient.gui.label.NewCharModel
Definition: NewCharModel.java:43
com.realtime.crossfire.jxclient.gui.textinput.GUIText.insertChar
void insertChar(final char ch)
Definition: GUIText.java:490
com.realtime.crossfire.jxclient.gui.gui
Definition: AbstractGUIElement.java:23
com.realtime.crossfire.jxclient.gui.textinput.GUIText.commandHistory
final CommandHistory commandHistory
Definition: GUIText.java:85
com.realtime.crossfire
com.realtime.crossfire.jxclient.gui.textinput.GUIText.SCROLL_CHARS
static final int SCROLL_CHARS
Definition: GUIText.java:72
com.realtime.crossfire.jxclient.gui.textinput.GUIText.historyNext
boolean historyNext()
Definition: GUIText.java:477
com.realtime.crossfire.jxclient.gui.textinput.GUIText
Definition: GUIText.java:61
com.realtime
com.realtime.crossfire.jxclient.gui.textinput.GUIText.setText
void setText(@NotNull final String text)
Definition: GUIText.java:223
com
com.realtime.crossfire.jxclient.gui.textinput.GUIText.selection
final Clipboard selection
Definition: GUIText.java:116
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChangedListener
void setChangedListener(@Nullable final GUIElementChangedListener changedListener)
Definition: AbstractGUIElement.java:272
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.setActive
void setActive(final boolean active)
Definition: ActivatableGUIElement.java:115
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.setChanged
void setChanged()
Definition: AbstractGUIElement.java:223
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.execute
abstract void execute()
com.realtime.crossfire.jxclient.gui.textinput.GUIText.syncCursor
final Object syncCursor
Definition: GUIText.java:174
com.realtime.crossfire.jxclient.gui.textinput.GUIText.keyPressed
boolean keyPressed(@NotNull final KeyEvent2 e)
Definition: GUIText.java:339
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.guiFactory
final GuiFactory guiFactory
Definition: AbstractGUIElement.java:48
com.realtime.crossfire.jxclient.gui.textinput.GUIText.getDisplayText
String getDisplayText()
Definition: GUIText.java:299
com.realtime.crossfire.jxclient.settings.CommandHistory.down
String down()
Definition: CommandHistory.java:118
com.realtime.crossfire.jxclient.gui.gui.GUIElementListener
Definition: GUIElementListener.java:32
com.realtime.crossfire.jxclient.gui.gui.AbstractGUIElement.tooltipManager
final TooltipManager tooltipManager
Definition: AbstractGUIElement.java:83
com.realtime.crossfire.jxclient.gui.gui.ActivatableGUIElement.isActive
boolean isActive()
Definition: ActivatableGUIElement.java:124
com.realtime.crossfire.jxclient.gui.label.NewCharModel.setErrorText
void setErrorText(final int priority, @Nullable final String text)
Definition: NewCharModel.java:383