21 package com.realtime.crossfire.jxclient.gui.label;
27 import java.awt.Color;
29 import org.jetbrains.annotations.NotNull;
30 import org.jetbrains.annotations.Nullable;
57 public void failure(@NotNull
final String command, @NotNull
final String arguments) {
58 setText(arguments.replaceFirst(
"^([0-9]+ )?",
""));
62 public void clearFailure() {
79 super(tooltipManager, elementListener, name, null, font, color, backgroundColor,
Alignment.
LEFT,
"");
Listener for GUIElement related events.
void dispose()
Releases all allocated resources.
void setText(@NotNull final String text)
The label text.
A AbstractLabel that renders the text as a list of plain strings.
final TooltipManager tooltipManager
The TooltipManager to update.
final CrossfireFailureListener crossfireFailureListener
The CrossfireFailureListener registered to receive failure messages.
static final long serialVersionUID
The serial version UID.
final GUIElementListener elementListener
The GUIElementListener to notify.
final Color backgroundColor
If set, the opaque background color.
final String name
The name of this element.
final CrossfireServerConnection crossfireServerConnection
The CrossfireServerConnection to monitor.
A GUIHTMLLabel that displays the last received "failure" message.
Interface for listeners interested in the "failure" messages received from the Crossfire server...
GUILabelFailure(@NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final Font font, @NotNull final Color color, @Nullable final Color backgroundColor)
Creates a new instance.
void removeCrossfireFailureListener(@NotNull CrossfireFailureListener listener)
Removes a listener to be notified of failure messages.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
void addCrossfireFailureListener(@NotNull CrossfireFailureListener listener)
Adds a listener to be notified of failure messages.