Class ConnectCommand
java.lang.Object
com.realtime.crossfire.jxclient.gui.commands.ConnectCommand
- All Implemented Interfaces:
GUICommand
A
GUICommand
which connects to a Crossfire server.-
Constructor Summary
ConstructorsConstructorDescriptionConnectCommand
(@NotNull GuiStateManager guiStateManager, @NotNull GUIText hostNameInputField) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this command may be executed.void
execute()
Executes the command.
-
Constructor Details
-
ConnectCommand
public ConnectCommand(@NotNull @NotNull GuiStateManager guiStateManager, @NotNull @NotNull GUIText hostNameInputField) Creates a new instance.- Parameters:
guiStateManager
- the gui state manager instancehostNameInputField
- the host name input field
-
-
Method Details
-
canExecute
public boolean canExecute()Description copied from interface:GUICommand
Returns whether this command may be executed.- Specified by:
canExecute
in interfaceGUICommand
- Returns:
- whether this command may be executed
-
execute
public void execute()Description copied from interface:GUICommand
Executes the command. Does nothing if called whileGUICommand.canExecute()
returnsfalse
.- Specified by:
execute
in interfaceGUICommand
-