21 package com.realtime.crossfire.jxclient.gui.commands;
28 import java.awt.Component;
29 import org.jetbrains.annotations.NotNull;
78 final GUIText loginField = gui.getFirstElement(
GUIText.class,
"character_login");
80 if (loginField == null) {
84 final String login = loginField.
getText();
85 if (login.isEmpty()) {
boolean canExecute()
Returns whether this command may be executed.whether this command may be executed ...
static Gui getGui(@NotNull final Component element)
Returns the Gui an element is part of.
Combines a list of GUIElements to for a gui.
AccountCreateCharacterCommand(@NotNull final CommandCallback commandCallback, @NotNull final Component button)
Creates a new instance.
void setActive(final boolean active)
Sets the active state of a GUI element.
String getText()
Returns the entered text.
A GUICommand sending a character creation request.
final Component element
The Component to find the Gui containing the fields.
Utility class for Gui related functions.
void accountCreateCharacter(@NotNull String login)
Creates a character.
Interface that defines callback functions needed by commands.
void execute()
Executes the command.Does nothing if called while canExecute() returnsfalse .
final CommandCallback commandCallback
The CommandCallback to use.
Abstract base class for text input fields.