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