22 package com.realtime.crossfire.jxclient.gui.textinput;
28 import java.awt.Color;
30 import java.awt.Image;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
70 public GUIQueryText(@NotNull
final CrossfireServerConnection server, @Nullable
final CommandHistory commandHistory, @NotNull
final CommandCallback commandCallback, @NotNull
final TooltipManager tooltipManager, @NotNull
final GUIElementListener elementListener, @NotNull
final String
name, @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) {
71 super(commandCallback, commandHistory, tooltipManager, elementListener, name, activeImage, inactiveImage, font, inactiveColor, activeColor, margin, text);
79 protected void execute(@NotNull
final String command) {
Listener for GUIElement related events.
final TooltipManager tooltipManager
The TooltipManager to update.
final GUIElementListener elementListener
The GUIElementListener to notify.
final CommandHistory commandHistory
The CommandHistory for this text field.
GUIQueryText(@NotNull final CrossfireServerConnection server, @Nullable final CommandHistory commandHistory, @NotNull final CommandCallback commandCallback, @NotNull final TooltipManager tooltipManager, @NotNull final GUIElementListener elementListener, @NotNull final String name, @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)
Creates a new instance.
final Font font
The font for rendering displayed text.
void execute(@NotNull final String command)
final StringBuilder text
The entered text.
final Color activeColor
The color for rendering displayed text when the element is active.
final String name
The name of this element.
final Color inactiveColor
The color for rendering displayed text when the element is inactive.
static final long serialVersionUID
The serial version UID.
Interface that defines callback functions needed by commands.
void sendReply(@NotNull String text)
Sends a "reply" command to the server.
final Image activeImage
The element's background image when it is active.
final Image inactiveImage
The element's background image when it is inactive.
Manages a list of previously entered commands.
final int margin
The left margin in pixels.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
void setText(@NotNull final String text)
Sets the entered text.
final CommandCallback commandCallback
The CommandCallback to use.
final CrossfireServerConnection server
The CrossfireServerConnection for sending reply commands.
Abstract base class for text input fields.
Input field for "query" dialogs.