22 package com.realtime.crossfire.jxclient.gui.textinput;
27 import java.awt.Color;
29 import java.awt.Image;
30 import org.jetbrains.annotations.NotNull;
31 import org.jetbrains.annotations.Nullable;
70 public GUICommandText(@NotNull
final CommandCallback commandCallback, @Nullable
final CommandHistory commandHistory, @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, @NotNull
final CommandExecutor commandExecutor) {
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.
void executeCommand(@NotNull final CharSequence commandLine)
Executes a command or a list of commands.
final GUIElementListener elementListener
The GUIElementListener to notify.
final CommandHistory commandHistory
The CommandHistory for this text field.
final CommandExecutor commandExecutor
The CommandExecutor for executing entered commands.
final Font font
The font for rendering displayed text.
static final long serialVersionUID
The serial version UID.
GUICommandText(@NotNull final CommandCallback commandCallback, @Nullable final CommandHistory commandHistory, @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, @NotNull final CommandExecutor commandExecutor)
Creates a new instance.
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.
void execute(@NotNull final String command)
A GUIText element that executes the entered text as a command.
Interface that defines callback functions needed by commands.
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.
void setText(@NotNull final String text)
Sets the entered text.
final CommandCallback commandCallback
The CommandCallback to use.
Abstract base class for text input fields.