 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.gui.textinput;
32 import java.awt.Color;
34 import java.awt.Image;
35 import org.jetbrains.annotations.NotNull;
36 import org.jetbrains.annotations.Nullable;
76 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 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) {
77 super(
commandCallback,
commandHistory,
tooltipManager,
elementListener,
name,
newCharModel,
activeImage,
inactiveImage,
font,
inactiveColor,
activeColor,
margin,
text,
guiFactory);
82 protected void execute(@NotNull
final String command) {
Abstract base class for text input fields.
Input field for "query" dialogs.
void sendReply(@NotNull String text)
Sends a "reply" command to the server.
final int margin
The left margin in pixels.
void notifyOpen()
Called each time the enclosing dialog is opened (or raised).
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
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 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)
Creates a new instance.
TooltipText getTooltip()
Returns the current tooltip text.
final Color inactiveColor
The color for rendering displayed text when the element is inactive.
final CrossfireServerConnection server
The CrossfireServerConnection for sending reply commands.
final CommandHistory commandHistory
The CommandHistory for this text field.
final Font font
The font for rendering displayed text.
void execute()
Executes the actions associated with this GUI element.
General information for creating new characters.
final GuiFactory guiFactory
The global GuiFactory instance.
final Image activeImage
The element's background image when it is active.
final GUIElementListener elementListener
The GUIElementListener to notify.
Information for displaying tooltips.
Factory for creating Gui instances.
final Color activeColor
The color for rendering displayed text when the element is active.
final String name
The name of this element.
final Image inactiveImage
The element's background image when it is inactive.
Interface that defines callback functions needed by commands.
static final long serialVersionUID
The serial version UID.
void setText(@NotNull final String text)
Sets the entered text.
final NewCharModel newCharModel
The NewCharModel that is shown.
Manages a list of previously entered commands.
final CommandCallback commandCallback
The CommandCallback to use.
final TooltipManager tooltipManager
The TooltipManager to update.
final StringBuilder text
The entered text.
Listener for GUIElement related events.
void execute(@NotNull final String command)
Will be called to execute the entered command.