com.realtime.crossfire.jxclient.gui.commands
Class AccountPlayCharacterCommand

java.lang.Object
  extended by com.realtime.crossfire.jxclient.gui.commands.AccountPlayCharacterCommand
All Implemented Interfaces:
GUICommand

public class AccountPlayCharacterCommand
extends java.lang.Object
implements GUICommand

A GUICommand sending a play character request to the server.


Field Summary
private  CommandCallback commandCallback
          The CommandCallback to use.
private  GUIElement element
          The GUIElement to find information for account creation.
 
Constructor Summary
AccountPlayCharacterCommand(CommandCallback commandCallback, GUIElement button)
          Creates a new instance.
 
Method Summary
 boolean canExecute()
          Returns whether this command may be executed.
 void execute()
          Executes the command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandCallback

@NotNull
private final CommandCallback commandCallback
The CommandCallback to use.


element

@NotNull
private final GUIElement element
The GUIElement to find information for account creation.

Constructor Detail

AccountPlayCharacterCommand

public AccountPlayCharacterCommand(@NotNull
                                   CommandCallback commandCallback,
                                   @NotNull
                                   GUIElement button)
Creates a new instance.

Parameters:
commandCallback - what to inform of the request.
button - element to find the Gui for the other fields.
Method Detail

canExecute

public boolean canExecute()
Returns whether this command may be executed.

Specified by:
canExecute in interface GUICommand
Returns:
whether this command may be executed

execute

public void execute()
Executes the command. Does nothing if called while GUICommand.canExecute() returns false.

Specified by:
execute in interface GUICommand