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;
71 public GUITextField(@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 CommandList commandList) {
72 super(commandCallback, commandHistory, tooltipManager, elementListener, name, activeImage, inactiveImage, font, inactiveColor, activeColor, margin, text);
80 protected void execute(@NotNull
final String command) {
Listener for GUIElement related events.
GUITextField(@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 CommandList commandList)
Creates a new instance.
final TooltipManager tooltipManager
The TooltipManager to update.
final GUIElementListener elementListener
The GUIElementListener to notify.
final CommandHistory commandHistory
The CommandHistory for this text field.
final Font font
The font for rendering displayed text.
static final long serialVersionUID
The serial version UID.
final CommandList commandList
The CommandList for executing commands.
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.
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.
A text input field which executes a CommandList when ENTER is pressed.
Manages a list of previously entered commands.
final int margin
The left margin in pixels.
final CommandCallback commandCallback
The CommandCallback to use.
A list of GUICommand instances.
void execute(@NotNull final String command)
void execute()
Execute the command list by calling GUICommand#execute() for each command in order.
Abstract base class for text input fields.