sarj
Interface GUIListener

All Known Implementing Classes:
Sarj

public interface GUIListener

Defines a listener interface for events generated by user interaction with the GUI


Method Summary
 void onAction(int actionID)
          Called when the Perform button is clicked on the GUI
 void onAddAdmin(java.lang.String playerIP)
          Called when the user chooses to add a player to the remote administrators list
 void onBanPlayer(int playerNumber)
          Called when the user chooses to ban a player from the list of currently connected players
 void onCommand(java.lang.String text)
          Called when a command is sent from the user
 void onConnect(java.lang.String address, int port, java.lang.String password)
          Called when the Connect button is clicked on the GUI
 void onDisconnect()
          Called when the Disconnect button is clicked on the GUI
 void onExit()
          Called when the Exit button is clicked on the GUI, or the main GUI window is closed
 void onKickPlayer(int playerNumber)
          Called when the user chooses to kick a player from the list of currently connected players
 void onRefresh()
          Called when the Refresh button is clicked on the GUI, or the refresh timer triggers
 void onRemoveAdmin(java.lang.String playerIP)
          Called when the user chooses to remove a player from the remote administrators list
 void onScriptButtonClick(java.lang.String name, java.lang.String scriptFile)
          Called when a user clicks a ScriptButton
 void onSetTeam(int playerNumber, int teamNumber)
          Called when the user chooses to assign a connected player to a particular team
 

Method Detail

onConnect

void onConnect(java.lang.String address,
               int port,
               java.lang.String password)
Called when the Connect button is clicked on the GUI

Parameters:
address - the address of the Soldat server, in dotted IP format (X.X.X.X)
port - the port number of the Soldat server
password - the remote administration password for the server

onDisconnect

void onDisconnect()
Called when the Disconnect button is clicked on the GUI


onExit

void onExit()
Called when the Exit button is clicked on the GUI, or the main GUI window is closed


onAction

void onAction(int actionID)
Called when the Perform button is clicked on the GUI

Parameters:
actionID - the ID of the action to be performed

onRefresh

void onRefresh()
Called when the Refresh button is clicked on the GUI, or the refresh timer triggers


onCommand

void onCommand(java.lang.String text)
Called when a command is sent from the user

Parameters:
text - the command string issued by the user

onKickPlayer

void onKickPlayer(int playerNumber)
Called when the user chooses to kick a player from the list of currently connected players

Parameters:
playerNumber - the unique in-game ID number of the player

onBanPlayer

void onBanPlayer(int playerNumber)
Called when the user chooses to ban a player from the list of currently connected players

Parameters:
playerNumber - the unique in-game ID number of the player

onAddAdmin

void onAddAdmin(java.lang.String playerIP)
Called when the user chooses to add a player to the remote administrators list

Parameters:
playerIP - the IP address of the player

onRemoveAdmin

void onRemoveAdmin(java.lang.String playerIP)
Called when the user chooses to remove a player from the remote administrators list

Parameters:
playerIP - the IP address of the player

onSetTeam

void onSetTeam(int playerNumber,
               int teamNumber)
Called when the user chooses to assign a connected player to a particular team

Parameters:
playerNumber - the unique in-game ID number of the player
teamNumber - the ID of the team to assign the player to, where 1 = alpha, 2 = beta, 3 = charlie and 4 = delta

onScriptButtonClick

void onScriptButtonClick(java.lang.String name,
                         java.lang.String scriptFile)
Called when a user clicks a ScriptButton

Parameters:
name - the name/caption of the button
scriptFile - the script file associated with the ScriptButton