 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.gui.misc;
35 import java.awt.Color;
37 import org.jetbrains.annotations.NotNull;
38 import org.jetbrains.annotations.Nullable;
82 public void commandDrawinfoReceived(@NotNull
final String
text,
final int type) {
99 public void commandDrawextinfoReceived(
final int color,
final int type,
final int subtype, @NotNull
final String message) {
107 public void setDebugMode(
final boolean printMessageTypes) {
143 final StringBuilder sb =
new StringBuilder();
145 while (pos <
text.length()) {
155 int endPos2 = endPos;
156 while (endPos2 > pos) {
158 final int ch =
text.charAt(endPos2);
164 sb.append(
text, pos, endPos2);
167 sb.append(
text, pos, endPos);
170 }
else if (endPos >=
text.length()) {
172 sb.append(
text.substring(pos));
175 assert
text.charAt(endPos) ==
'\n';
177 sb.append(
text, pos, endPos);
181 super.setText(sb.isEmpty() ?
"" : sb.substring(1));
void removeCrossfireDrawextinfoListener(@NotNull CrossfireDrawextinfoListener listener)
Removes the given listener from the list of objects listening to the drawextinfo S->C messages.
Combines a list of GUIElements to for a gui.
final CrossfireDrawextinfoListener crossfireDrawextinfoListener
The CrossfireDrawextinfoListener registered to receive drawextinfo messages.
Interface for listeners interested in drawinfo messages received from the Crossfire server.
Gui getGui(@NotNull final AbstractGUIElement element)
Returns the Gui an element is part of.
GUILabelMessage(@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final JXCWindowRenderer windowRenderer, @NotNull final Font font, @NotNull final Color color, @Nullable final Color backgroundColor, @NotNull final GuiFactory guiFactory)
Creates a new instance.
final Color backgroundColor
If set, the opaque background color.
void removeCrossfireDrawinfoListener(@NotNull CrossfireDrawinfoListener listener)
Removes the given listener from the list of objects listening to the drawinfo S->C messages.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
boolean isDialogOpen(@NotNull final Gui dialog)
Returns whether a given dialog is currently visible.
final GUIElementListener elementListener
The GUIElementListener to notify.
final CrossfireServerConnection crossfireServerConnection
The CrossfireServerConnection to monitor.
final GuiFactory guiFactory
The global GuiFactory instance.
final CrossfireDrawinfoListener crossfireDrawinfoListener
The CrossfireDrawinfoListener registered to receive drawinfo messages.
void dispose()
Releases all allocated resources.
final JXCWindowRenderer windowRenderer
The JXCWindowRenderer this element belongs to.
Implements an AbstractLabel that displays HTML contents.
static final long serialVersionUID
The serial version UID.
void setText(@NotNull final String text)
Sets the label text.
Renders a Gui instance into a Frame.
Interface for listeners interested in drawextinfo messages received from the Crossfire server.
Factory for creating Gui instances.
final String name
The name of this element.
String text
The label text.
A AbstractLabel that renders the text as a list of plain strings.
static final int MAX_LINE_LENGTH
The maximum line length in characters.
A GUIHTMLLabel that displays the last received "drawinfo" message.
final TooltipManager tooltipManager
The TooltipManager to update.
Listener for GUIElement related events.