com.realtime.crossfire.jxclient.main
Class Options

java.lang.Object
  extended by com.realtime.crossfire.jxclient.main.Options

public class Options
extends java.lang.Object

Command line argument parser.


Field Summary
private  boolean debugGui
          Enable debugging of GUI elements.
private  java.lang.String debugKeyboardFilename
          The filename for keyboard debug logs or null to not log keyboard input.
private  java.lang.String debugProtocolFilename
          The filename for Crossfire protocol message logs or null to not log protocol messages.
private  java.lang.String debugScreenFilename
          The filename for screen debug logs or null to not log screen logs.
private  java.lang.String debugSoundFilename
          The filename for sound debug logs or null to not log sound logs.
static java.lang.String DEFAULT_SKIN
          The default skin name.
private static int DEFAULT_TILE_SIZE
          The default size of tiles in the map view in pixels.
private  boolean fullScreen
          Whether full-screen mode should be enabled.
private  Resolution resolution
          The resolution to use or null for default.
private  java.lang.String server
          The Crossfire server to connect to or null to show the server selections screen.
private  Settings settings
          The Settings for saving/restoring defaults.
private  java.lang.String skin
          The skin name to load or null for the default skin.
private  int tileSize
          The size of tiles in the map view in pixels.
 
Constructor Summary
Options()
           
 
Method Summary
 java.lang.String getDebugKeyboardFilename()
          Returns the filename for keyboard debug logs.
 java.lang.String getDebugProtocolFilename()
          Returns the filename for Crossfire protocol debug logs.
 java.lang.String getDebugScreenFilename()
          Returns the filename for screen debug logs.
 java.lang.String getDebugSoundFilename()
          Returns the filename for sound debug logs.
 Resolution getResolution()
          Returns the resolution.
 java.lang.String getServer()
          Returns the Crossfire server to connect to.
 Settings getSettings()
          Returns the Settings for restoring/saving settings.
 java.lang.String getSkin()
          Returns the skin name.
 int getTileSize()
          Returns the size of a tile in the map view.
 boolean isDebugGui()
          Returns whether debugging of GUI elements is enabled.
 boolean isFullScreen()
          Returns whether full-screen mode should be enabled.
 void parse(java.lang.String[] args)
          Parse command line arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugGui

private boolean debugGui
Enable debugging of GUI elements.


debugKeyboardFilename

@Nullable
private java.lang.String debugKeyboardFilename
The filename for keyboard debug logs or null to not log keyboard input.


debugProtocolFilename

@Nullable
private java.lang.String debugProtocolFilename
The filename for Crossfire protocol message logs or null to not log protocol messages.


debugScreenFilename

@Nullable
private java.lang.String debugScreenFilename
The filename for screen debug logs or null to not log screen logs.


debugSoundFilename

@Nullable
private java.lang.String debugSoundFilename
The filename for sound debug logs or null to not log sound logs.


DEFAULT_SKIN

@NotNull
public static final java.lang.String DEFAULT_SKIN
The default skin name.

See Also:
Constant Field Values

DEFAULT_TILE_SIZE

private static final int DEFAULT_TILE_SIZE
The default size of tiles in the map view in pixels.

See Also:
Constant Field Values

fullScreen

private boolean fullScreen
Whether full-screen mode should be enabled.


resolution

@Nullable
private Resolution resolution
The resolution to use or null for default.


server

@Nullable
private java.lang.String server
The Crossfire server to connect to or null to show the server selections screen.


settings

@Nullable
private Settings settings
The Settings for saving/restoring defaults.


skin

@Nullable
private java.lang.String skin
The skin name to load or null for the default skin.


tileSize

private int tileSize
The size of tiles in the map view in pixels.

Constructor Detail

Options

public Options()
Method Detail

getDebugKeyboardFilename

@Nullable
public java.lang.String getDebugKeyboardFilename()
Returns the filename for keyboard debug logs.

Returns:
the filename or null to not log keyboard input

getDebugProtocolFilename

@Nullable
public java.lang.String getDebugProtocolFilename()
Returns the filename for Crossfire protocol debug logs.

Returns:
the filename or null to not log Crossfire protocol messages

getDebugScreenFilename

@Nullable
public java.lang.String getDebugScreenFilename()
Returns the filename for screen debug logs.

Returns:
the filename or null to not log screen logs

getDebugSoundFilename

@Nullable
public java.lang.String getDebugSoundFilename()
Returns the filename for sound debug logs.

Returns:
the filename or null to not log sound logs

getResolution

@Nullable
public Resolution getResolution()
Returns the resolution.

Returns:
the resolution or null for default

getServer

@Nullable
public java.lang.String getServer()
Returns the Crossfire server to connect to.

Returns:
the server or null for interactive server selection

getSettings

@NotNull
public Settings getSettings()
Returns the Settings for restoring/saving settings.

Returns:
the settings

getSkin

@Nullable
public java.lang.String getSkin()
Returns the skin name.

Returns:
the skin name or null for the default skin

getTileSize

public int getTileSize()
Returns the size of a tile in the map view.

Returns:
the tile size in pixels

isDebugGui

public boolean isDebugGui()
Returns whether debugging of GUI elements is enabled.

Returns:
whether debugging of GUI elements is enabled

isFullScreen

public boolean isFullScreen()
Returns whether full-screen mode should be enabled.

Returns:
whether full-screen mode should be enabled

parse

public void parse(@NotNull
                  java.lang.String[] args)
           throws java.io.IOException
Parse command line arguments.

Parameters:
args - the command line arguments
Throws:
java.io.IOException - if an I/O error occurs