|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScriptingFacade
This interface provides a basic set of functions to make scripting easier. The facade does not add any additional functionality, but simply 'wraps up' existing functionality to make it more easily accessible by a script.
Method Summary | |
---|---|
void |
clearConsole()
Clears the console on the main window |
void |
connectClient()
Connects the client to the IP and port displayed on the main window |
void |
connectClient(java.lang.String ip,
int port)
Connects the client to the specified IP and port |
void |
disconnectClient()
Disconnects the client from any connected server |
java.lang.String |
getCommandBox()
Returns the value of the command combo box on the main window |
java.lang.String |
getCurrentMap()
Returns the name of the map currently being played on the server |
java.lang.String |
getGameType()
Returns the type of game running on the server |
java.lang.String |
getIPField()
Returns the value of the IP field on the main window |
int |
getNumPlayers()
Returns the number of players connected to the server |
java.lang.String |
getPasswordField()
Returns the current value stored in the password field on the main window |
java.lang.String[][] |
getPlayerData()
Returns all data within the player table on the main window |
java.lang.String[] |
getPlayerData(java.lang.String playerName)
Returns the row of the player table with the player name matching that provided |
java.lang.String |
getPortField()
Returns the value of the port field on the main window |
int |
getScoreLimit()
Returns the score limit of the game |
java.lang.String[][] |
getTeamData()
Returns all data within the team table on the main window |
java.lang.String[] |
getTeamData(java.lang.String teamName)
Returns the row of the team table with the team name matching that provided |
int |
getTimeLeft()
Returns the time left within the current game |
int |
getTimeLimit()
Returns the time limit of the current game |
java.lang.String |
getWindowTitle()
Returns the main SARJ window title |
void |
sendData(java.lang.String data)
Sends data to a connected server |
void |
setCommandBox(java.lang.String command)
Sets the command combo box field on the main window |
void |
setIPField(java.lang.String ip)
Sets the IP field on the main window |
void |
setPasswordField(java.lang.String password)
Sets the password field on the main window |
void |
setPortField(java.lang.String port)
Sets the port field on the main window |
void |
setWindowTitle(java.lang.String title)
Sets the main SARJ window title to that specified |
void |
writeToConsole(java.lang.String text)
Writes text to the main command console |
Method Detail |
---|
java.lang.String getCurrentMap()
String
containing the name of the current mapjava.lang.String getGameType()
String
containing the name of the current game typeint getTimeLimit()
int getScoreLimit()
int getTimeLeft()
int getNumPlayers()
void setWindowTitle(java.lang.String title)
title
- the new title for the windowjava.lang.String getWindowTitle()
String
containing the title of the main windowjava.lang.String getIPField()
String
containing the value of the IP fieldjava.lang.String getPortField()
String
containing the value of the port fieldjava.lang.String getPasswordField()
java.lang.String getCommandBox()
String
containing the value of the command combo boxvoid setIPField(java.lang.String ip)
ip
- the new IP address valuevoid setPortField(java.lang.String port)
port
- the new port valuevoid setPasswordField(java.lang.String password)
password
- the new password valuevoid setCommandBox(java.lang.String command)
command
- the new value to set the command combo box tovoid clearConsole()
void disconnectClient()
void connectClient(java.lang.String ip, int port)
ip
- the IP address of the serverport
- the port number of the servervoid connectClient()
void writeToConsole(java.lang.String text)
text
- the text to print on the consolevoid sendData(java.lang.String data)
data
- the data to sendjava.lang.String[] getPlayerData(java.lang.String playerName)
playerName
- the name of the player to match
java.lang.String[][] getPlayerData()
String
objects containing the data in the
tablejava.lang.String[] getTeamData(java.lang.String teamName)
teamName
- the name of the team to match
java.lang.String[][] getTeamData()
String
objects containing the data in the
table
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |