 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.gui.commands;
33 import org.jetbrains.annotations.NotNull;
87 if (loginField ==
null || passwordField ==
null || confirmField ==
null) {
91 final String login = loginField.
getText();
92 final String password = passwordField.
getText();
93 final String confirm = confirmField.
getText();
95 if (login.isEmpty()) {
98 error.
setText(
"Can't have an empty login!");
104 if (password.isEmpty()) {
107 error.
setText(
"Can't have an empty password!");
113 if (confirm.isEmpty()) {
117 if (!confirm.equals(password)) {
120 error.
setText(
"Passwords don't match!");
Abstract base class for text input fields.
AccountCreateCommand(@NotNull final CommandCallback commandCallback, @NotNull final AbstractGUIElement button, @NotNull final GuiFactory guiFactory)
Creates a new instance.
Combines a list of GUIElements to for a gui.
Gui getGui(@NotNull final AbstractGUIElement element)
Returns the Gui an element is part of.
final GuiFactory guiFactory
The global GuiFactory instance.
void accountCreate(@NotNull String login, @NotNull String password)
Creates an account.
A GUICommand sending an account creation request.
void execute()
Executes the command.
Abstract base class for GUI elements to be shown in Guis.
Abstract base class for all label classes.
boolean canExecute()
Returns whether this command may be executed.
final CommandCallback commandCallback
The CommandCallback to use.
void setText(@NotNull final String text)
Sets the label text.
Factory for creating Gui instances.
final AbstractGUIElement element
The AbstractGUIElement to find information for account creation.
A GUIHTMLLabel that displays the last received "failure" message.
Interface that defines callback functions needed by commands.
void setText(@NotNull final String text)
Sets the entered text.
public< T extends GUIElement > T getFirstElement(@NotNull final Class< T > class_)
Returns the first gui element of this gui belonging to the given class.
String getText()
Returns the entered text.
void setActive(final boolean active)
Sets the active state of a GUI element.