Crossfire JXClient, Trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.gui.commandlist.CommandList Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.gui.commandlist.CommandList:
Collaboration graph

Public Member Functions

void add (@NotNull final GUICommand guiCommand)
 
 CommandList (@NotNull final CommandListType commandListType)
 
boolean containsCommand (@NotNull final Class<? extends GUICommand > command)
 
void execute ()
 
String getCommandString ()
 
GUICommand getSingleCommand ()
 

Private Member Functions

boolean canExecute ()
 

Private Attributes

final List< GUICommandcommandList = new ArrayList<>()
 
final CommandListType commandListType
 

Detailed Description

A list of GUICommand instances.

Author
Andreas Kirschbaum

Definition at line 34 of file CommandList.java.

Constructor & Destructor Documentation

◆ CommandList()

com.realtime.crossfire.jxclient.gui.commandlist.CommandList.CommandList ( @NotNull final CommandListType  commandListType)

Creates a new instance as an empty command list.

Parameters
commandListTypethe command list type

Definition at line 52 of file CommandList.java.

References com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandListType.

Member Function Documentation

◆ add()

void com.realtime.crossfire.jxclient.gui.commandlist.CommandList.add ( @NotNull final GUICommand  guiCommand)

Adds a command to the end of this command list.

Parameters
guiCommandthe command to add

Definition at line 60 of file CommandList.java.

References com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandList.

Referenced by com.realtime.crossfire.jxclient.skin.io.JXCSkinLoader.addCommand(), com.realtime.crossfire.jxclient.commands.BindCommand.execute(), and com.realtime.crossfire.jxclient.gui.keybindings.KeyBindings.parseKeyBinding().

Here is the caller graph for this function:

◆ canExecute()

boolean com.realtime.crossfire.jxclient.gui.commandlist.CommandList.canExecute ( )
private

Returns whether execution is possible.

Returns
whether execution is possible

Definition at line 68 of file CommandList.java.

References com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandList, and com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandListType.

Referenced by com.realtime.crossfire.jxclient.gui.commandlist.CommandList.execute().

Here is the caller graph for this function:

◆ containsCommand()

boolean com.realtime.crossfire.jxclient.gui.commandlist.CommandList.containsCommand ( @NotNull final Class<? extends GUICommand command)

Returns whether this command list contains a command of the given type.

Parameters
commandthe command type
Returns
whether the command type was found

Definition at line 135 of file CommandList.java.

References com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandList.

Referenced by com.realtime.crossfire.jxclient.gui.button.AbstractButton.AbstractButton(), and com.realtime.crossfire.jxclient.gui.button.AbstractButton.dispose().

Here is the caller graph for this function:

◆ execute()

void com.realtime.crossfire.jxclient.gui.commandlist.CommandList.execute ( )

◆ getCommandString()

String com.realtime.crossfire.jxclient.gui.commandlist.CommandList.getCommandString ( )

Returns the commands as a string.

Returns
the commands as a string

Definition at line 112 of file CommandList.java.

References com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandList.

Referenced by com.realtime.crossfire.jxclient.gui.keybindings.KeyBinding.getCommandString().

Here is the caller graph for this function:

◆ getSingleCommand()

GUICommand com.realtime.crossfire.jxclient.gui.commandlist.CommandList.getSingleCommand ( )

Returns the single command of this command list.

Returns
the single command or
null
if this command list does not consist of exactly one command

Definition at line 150 of file CommandList.java.

References com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandList.

Referenced by com.realtime.crossfire.jxclient.gui.button.GUITextButton.GUITextButton().

Here is the caller graph for this function:

Member Data Documentation

◆ commandList

final List<GUICommand> com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandList = new ArrayList<>()
private

◆ commandListType

final CommandListType com.realtime.crossfire.jxclient.gui.commandlist.CommandList.commandListType
private

The documentation for this class was generated from the following file: