|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.FreeCol
public final class FreeCol
This class is responsible for handling the command-line arguments and starting either the stand-alone server or the client-GUI.
FreeColClient,
FreeColServer| Field Summary | |
|---|---|
private static java.io.File |
autoSaveDirectory
Directory containing automatically created save games. |
private static boolean |
checkIntegrity
|
static java.lang.String |
CLIENT_THREAD
|
private static java.io.File |
clientOptionsFile
|
private static boolean |
consoleLogging
|
private static java.lang.String |
dataFolder
|
private static int |
DEFAULT_PORT
|
private static java.lang.String |
DEFAULT_SPLASH_FILE
|
private static java.lang.String |
DEFAULT_TC
|
private static int |
DEFAULT_WINDOW_SPACE
The space not being used in windowed mode. |
private static boolean |
displaySplash
|
private static java.lang.String |
FILE_SEP
|
private static java.lang.String |
FREECOL_REVISION
|
private static java.lang.String |
FREECOL_VERSION
|
private static FreeColClient |
freeColClient
|
private static boolean |
inDebugMode
|
private static boolean |
introVideo
|
private static boolean |
javaCheck
|
private static java.lang.String |
logFile
|
private static java.util.logging.Logger |
logger
|
private static java.util.logging.Level |
logLevel
|
private static java.io.File |
mainUserDirectory
|
private static boolean |
memoryCheck
|
static java.lang.String |
META_SERVER_ADDRESS
|
static int |
META_SERVER_PORT
|
static java.lang.String |
METASERVER_THREAD
|
private static java.lang.String |
MIN_JDK_VERSION
|
private static org.apache.commons.cli.Options |
options
|
private static boolean |
publicServer
|
private static java.io.File |
saveDirectory
|
private static java.io.File |
savegameFile
|
static java.lang.String |
SERVER_THREAD
|
private static java.lang.String |
serverName
|
private static int |
serverPort
|
private static boolean |
sound
|
private static java.lang.String |
splashFilename
|
private static boolean |
standAloneServer
|
private static java.lang.String |
tc
|
private static java.io.File |
tcUserDirectory
|
private static boolean |
usesExperimentalAI
|
private static boolean |
windowed
|
private static java.awt.Dimension |
windowSize
|
| Constructor Summary | |
|---|---|
private |
FreeCol()
|
| Method Summary | |
|---|---|
private static boolean |
checkJavaVersion()
Ensure that the Java version is good enough. |
private static java.io.File |
createAndSetDirectories()
Creates a freecol dir for the current user. |
private static javax.swing.JWindow |
displaySplash(java.lang.String filename)
Displays a splash screen. |
static java.io.File |
getAutosaveDirectory()
Returns the directory where the autogenerated savegames should be put. |
static java.io.File |
getClientOptionsFile()
Returns the file containing the client options. |
static java.io.File |
getDataDirectory()
Returns the data directory. |
static int |
getDefaultPort()
Returns the default server network port. |
static FreeColClient |
getFreeColClient()
Gets the FreeColClient. |
static java.util.Locale |
getLocale()
Determines the Locale to be used. |
static java.io.File |
getModsDirectory()
Returns the mods directory. |
static java.lang.String |
getRevision()
Gets the current revision of game. |
static java.io.File |
getSaveDirectory()
Returns the directory where the savegames should be put. |
static Specification |
getSpecification()
Returns the specification object for Freecol. |
static java.io.InputStream |
getSpecificationInputStream()
|
static java.lang.String |
getVersion()
Gets the current version of game. |
private static void |
handleArgs(java.lang.String[] args)
Checks the command-line arguments and takes appropriate actions for each of them. |
static boolean |
initializeResourceFolders()
|
private static void |
initLogging()
Initialize loggers. |
static boolean |
isInDebugMode()
Checks if the program is in "Debug mode". |
static void |
main(java.lang.String[] args)
The entrypoint. |
private static void |
printUsage()
|
private static void |
removeSplash(javax.swing.JWindow splash)
Removes splash screen. |
static void |
setInDebugMode(boolean debug)
Sets the "debug mode" to be active or not. |
static void |
setSaveDirectory(java.io.File saveDirectory)
Set the directory where the savegames should be put. |
private static void |
setSavegame(java.lang.String name)
Set up the save file and directory |
static boolean |
usesExperimentalAI()
Checks if the program is in "Experimental AI mode". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String META_SERVER_ADDRESS
public static final int META_SERVER_PORT
public static final java.lang.String CLIENT_THREAD
public static final java.lang.String SERVER_THREAD
public static final java.lang.String METASERVER_THREAD
private static final int DEFAULT_WINDOW_SPACE
private static final java.util.logging.Logger logger
private static final java.lang.String FREECOL_VERSION
private static java.lang.String FREECOL_REVISION
private static final java.lang.String MIN_JDK_VERSION
private static final java.lang.String FILE_SEP
private static final java.lang.String DEFAULT_SPLASH_FILE
private static final java.lang.String DEFAULT_TC
private static boolean windowed
private static boolean sound
private static boolean javaCheck
private static boolean memoryCheck
private static boolean consoleLogging
private static boolean introVideo
private static java.awt.Dimension windowSize
private static java.lang.String dataFolder
private static java.lang.String logFile
private static FreeColClient freeColClient
private static boolean standAloneServer
private static boolean publicServer
private static boolean inDebugMode
private static boolean usesExperimentalAI
private static int serverPort
private static java.lang.String serverName
private static final int DEFAULT_PORT
private static java.io.File mainUserDirectory
private static java.io.File saveDirectory
private static java.io.File autoSaveDirectory
private static java.io.File tcUserDirectory
private static java.lang.String tc
private static java.io.File savegameFile
private static java.io.File clientOptionsFile
private static java.util.logging.Level logLevel
private static boolean checkIntegrity
private static final org.apache.commons.cli.Options options
private static java.lang.String splashFilename
private static boolean displaySplash
| Constructor Detail |
|---|
private FreeCol()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - The command-line arguments.private static javax.swing.JWindow displaySplash(java.lang.String filename)
private static void removeSplash(javax.swing.JWindow splash)
private static void initLogging()
public static java.util.Locale getLocale()
Locale to be used.
public static int getDefaultPort()
public static java.io.File getClientOptionsFile()
public static Specification getSpecification()
public static FreeColClient getFreeColClient()
FreeColClient.
FreeColClient, or null
if the game is run as a standalone server.private static java.io.File createAndSetDirectories()
private static void setSavegame(java.lang.String name)
name - the name of the save file to usepublic static java.io.File getSaveDirectory()
public static void setSaveDirectory(java.io.File saveDirectory)
saveDirectory - a File value for the savegame directorypublic static java.io.File getDataDirectory()
public static java.io.File getModsDirectory()
public static java.io.File getAutosaveDirectory()
public static java.io.InputStream getSpecificationInputStream()
throws java.io.IOException
java.io.IOExceptionpublic static boolean initializeResourceFolders()
private static boolean checkJavaVersion()
private static void handleArgs(java.lang.String[] args)
args - The command-line arguments.private static void printUsage()
public static java.lang.String getVersion()
public static java.lang.String getRevision()
public static boolean isInDebugMode()
true if the program is in debug
mode and false otherwise.public static void setInDebugMode(boolean debug)
debug - Should be true in order
to active debug mode and false
otherwise.public static boolean usesExperimentalAI()
true if the program is in Experimental AI
mode and false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||