 |
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;
77 public GUITextField(@NotNull
final CommandCallback commandCallback, @Nullable
final CommandHistory commandHistory, @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 CommandList commandList, @NotNull
final GuiFactory guiFactory) {
78 super(
commandCallback,
commandHistory,
tooltipManager,
elementListener,
name,
newCharModel,
activeImage,
inactiveImage,
font,
inactiveColor,
activeColor,
margin,
text,
guiFactory);
83 protected void execute(@NotNull
final String command) {
Abstract base class for text input fields.
final int margin
The left margin in pixels.
static final long serialVersionUID
The serial version UID.
void execute()
Executes the actions associated with this GUI element.
final Color inactiveColor
The color for rendering displayed text when the element is inactive.
final CommandHistory commandHistory
The CommandHistory for this text field.
final CommandList commandList
The CommandList for executing commands.
final Font font
The font for rendering displayed text.
A text input field which executes a CommandList when ENTER is pressed.
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.
void execute()
Execute the command list by calling GUICommand#execute() for each command in order.
A list of GUICommand 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.
void execute(@NotNull final String command)
Will be called to execute the entered command.
TooltipText getTooltip()
Returns the current tooltip text.
GUITextField(@NotNull final CommandCallback commandCallback, @Nullable final CommandHistory commandHistory, @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 CommandList commandList, @NotNull final GuiFactory guiFactory)
Creates a new instance.
final NewCharModel newCharModel
The NewCharModel that is shown.
Manages a list of previously entered commands.
void notifyOpen()
Called each time the enclosing dialog is opened (or raised).
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.