Package net.sf.freecol.client
Class ClientOptions
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Comparable<FreeColObject>
,ObjectWithId
,Option<OptionGroup>
,OptionContainer
public class ClientOptions extends OptionGroup
Defines how available client options are displayed on the Setting dialog from File/Preferences Also contains several Comparators used for display purposes. Most available client options and their default values are defined in the filebase/client-options.xml
in the FreeCol data directory. They are overridden by the player's personal settings in the fileoptions.xml
in the user directory. Note that some options are generated and added dynamically. Each option should be given an unique identifier (defined as a constant in this class). In general, the options are called something like "model.option.UNIQUENAME". Since the options must also be represented by the GUI, they following two keys must be added to the fileFreeColMessages.properties
:- model.option.UNIQUENAME.name
- model.option.UNIQUENAME.shortDescription
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ALWAYS_CENTER
Selected tiles always gets centered if this option is enabled (even if the tile is on screen.static java.lang.String
AUDIO_ALERTS
Play an alert sound on message arrival.private static java.lang.String
AUDIO_GROUP
static java.lang.String
AUDIO_MIXER
Choose the default mixer.static java.lang.String
AUDIO_VOLUME
The volume level to set.static java.lang.String
AUTO_END_TURN
Automatically end the turn when no units can be * made active.static java.lang.String
AUTO_SAVE_PREFIX
Prefix for the auto-save file.static java.lang.String
AUTO_SCROLL
Option to auto-scroll on mouse movement.static java.lang.String
AUTOLOAD_EMIGRANTS
Option to autoload emigrants on sailing to america.static java.lang.String
AUTOLOAD_SENTRIES
Option to autoload sentried units.static java.lang.String
AUTOMATIC
Value for automatic language selection.static java.lang.String
AUTOSAVE_DELETE
Option for deleting autosaves when a new game is started.static java.lang.String
AUTOSAVE_PERIOD
Option for setting the period of autosaves.static java.lang.String
AUTOSAVE_VALIDITY
Option for setting the number of days autosaves are keep (valid time).static java.lang.String
BEFORE_LAST_TURN_NAME
Stem of the before-last-turn save file name.static java.lang.String
COLONY_COMPARATOR
Used by GUI to sort colonies.static int
COLONY_COMPARATOR_AGE
static int
COLONY_COMPARATOR_NAME
static int
COLONY_COMPARATOR_POSITION
static int
COLONY_COMPARATOR_SIZE
static int
COLONY_COMPARATOR_SOL
static int
COLONY_LABELS_CLASSIC
static int
COLONY_LABELS_MODERN
static int
COLONY_LABELS_NONE
static java.lang.String
COLONY_REPORT
Option for selecting the compact colony report.static int
COLONY_REPORT_CLASSIC
static int
COLONY_REPORT_COMPACT
private static java.util.Comparator<Colony>
colonyAgeComparator
Compare by ascending age.private static java.util.concurrent.atomic.AtomicReference<java.util.Comparator<Colony>>
colonyNameComparator
Compare by name, initialized at run time.private static java.util.Comparator<Colony>
colonyPositionComparator
Compare by position on the map.private static java.util.Comparator<Colony>
colonySizeComparator
Compare by descending size then liberty.private static java.util.Comparator<Colony>
colonySoLComparator
Compare by descending liberty then size.static java.lang.String
CONFIRM_SAVE_OVERWRITE
Whether to display confirmation for the overwrite of existing save files.static java.lang.String
CUSTOM_STOCK
The amount of stock the custom house should keep when selling goods.static java.lang.String
DEFAULT_ZOOM_LEVEL
Default zoom level of the minimap.static java.lang.String
DISABLE_GRAY_LAYER
Whether to display end turn grey background or not.static java.lang.String
DISPLAY_BORDERS
Whether to display borders by default or not.static java.lang.String
DISPLAY_COLONY_LABELS
Style of colony labels.static java.lang.String
DISPLAY_COMPASS_ROSE
Whether to display a compass rose or not.static java.lang.String
DISPLAY_FOG_OF_WAR
Whether to draw the fog of war on the actual map or not.static java.lang.String
DISPLAY_GRID
Whether to display the grid by default or not.private static java.lang.String
DISPLAY_GROUP
static java.lang.String
DISPLAY_MAP_CONTROLS
Whether to display the map controls or not.static java.lang.String
DISPLAY_SCALING
Option to control the display scale factor.static java.lang.String
DISPLAY_TILE_TEXT
What text to display in the tiles.static int
DISPLAY_TILE_TEXT_EMPTY
static int
DISPLAY_TILE_TEXT_NAMES
static int
DISPLAY_TILE_TEXT_OWNERS
static int
DISPLAY_TILE_TEXT_REGIONS
static java.lang.String
ENEMY_MOVE_ANIMATION_SPEED
Animation speed for enemy units.static java.lang.String
ETC
The dynamic placement options.static java.lang.String
FRIENDLY_MOVE_ANIMATION_SPEED
Animation speed for friendly units.private static java.util.Map<java.lang.Integer,java.lang.String>
friendlyMoveAnimationSpeeds
Friendly move animation speed option values.private static java.lang.String
GUI_GROUP
static java.lang.String
HIGH_LEVEL
Generate warning of stock exceeds this percentage of capacity.static java.lang.String
INDIAN_DEMAND_RESPONSE
Set the default native demand action.static int
INDIAN_DEMAND_RESPONSE_ACCEPT
static int
INDIAN_DEMAND_RESPONSE_ASK
static int
INDIAN_DEMAND_RESPONSE_REJECT
private static java.lang.String
INTERFACE_GROUP
static java.lang.String
JUMP_TO_ACTIVE_UNIT
If this option is enabled, the display will recenter in order to display the active unit if it is not on screen.static java.lang.String
LABOUR_REPORT
The type of labour report to display.static int
LABOUR_REPORT_CLASSIC
static int
LABOUR_REPORT_COMPACT
static java.lang.String
LANGUAGE
Special option for setting the language.static java.lang.String
LAST_TURN_NAME
Stem of the last-turn save file name.private static java.util.logging.Logger
logger
static java.lang.String
LOW_LEVEL
Generate warning of stock drops below this percentage of capacity.static java.lang.String
MAIN_FONT_SIZE
Value to use to override the main font size, if enabled by the above.static java.lang.String
MANUAL_MAIN_FONT_SIZE
Enable manual override of main font size.static java.lang.String
MAP_CONTROLS
The type of map controls, corner or classic.static java.lang.String
MAP_CONTROLS_CLASSIC
static java.lang.String
MAP_CONTROLS_CORNERS
Styles of map controls.static java.lang.String
MAP_SCROLL_ON_DRAG
Option to scroll when dragging units on the mapboard.private static java.lang.String
MAPCONTROLS_GROUP
private static java.lang.String
MAPVIEW_GROUP
static java.lang.String
MAX_NUMBER_OF_GOODS_IMAGES
Used by GUI, this is the most repetitions drawn of a goods image for a single goods grouping.private static java.lang.String
MESSAGES_GROUP
static java.lang.String
MESSAGES_GROUP_BY
Used by GUI, this defines the grouping of ModelMessages.static int
MESSAGES_GROUP_BY_NOTHING
static int
MESSAGES_GROUP_BY_SOURCE
static int
MESSAGES_GROUP_BY_TYPE
static java.lang.String
MIN_NUMBER_FOR_DISPLAYING_GOODS
Used by GUI, this is the minimum number of goods a colony must possess for the goods to show up at the bottom of the colony panel.static java.lang.String
MIN_NUMBER_FOR_DISPLAYING_GOODS_COUNT
Used by GUI, the number will be displayed when a group of goods are higher than this number.static java.lang.String
MINIMAP_BACKGROUND_COLOR
The color to fill in around the actual map on the minimap.static java.lang.String
MINIMAP_TOGGLE_BORDERS
Whether to draw the borders on the minimap.static java.lang.String
MINIMAP_TOGGLE_FOG_OF_WAR
Whether to draw the fog of war on the minimap.static java.lang.String
MOVE_ANIMATION_SPEED
Animation speed for our units.static java.lang.String
NAME
Option for the player's preferred name.private static java.lang.String
OTHER_GROUP
private static java.lang.String
PERSONAL_GROUP
static java.lang.String
REMEMBER_PANEL_POSITIONS
Whether to remember the positions of various dialogs and panels.static java.lang.String
REMEMBER_PANEL_SIZES
Whether to remember the sizes of various dialogs and panels.private static java.lang.String
SAVEGAMES_GROUP
static java.lang.String
SHOW_COLONY_WARNINGS
Show warnings about colony sites.static java.lang.String
SHOW_END_TURN_DIALOG
Show the end turn dialog.static java.lang.String
SHOW_GOODS_MOVEMENT
Show goods movement messages.static java.lang.String
SHOW_NOT_BEST_TILE
Show warnings about suboptimal colony tile choice.static java.lang.String
SHOW_PRECOMBAT
Show the pre-combat dialog?static java.lang.String
SHOW_REGION_NAMING
static java.lang.String
SHOW_SAVEGAME_SETTINGS
Use default values for savegames instead of displaying a dialog.static int
SHOW_SAVEGAME_SETTINGS_ALWAYS
static int
SHOW_SAVEGAME_SETTINGS_MULTIPLAYER
static int
SHOW_SAVEGAME_SETTINGS_NEVER
private static java.util.List<java.lang.String>
specialKeys
static java.lang.String
STOCK_ACCOUNTS_FOR_PRODUCTION
Should trade route units check production to determine goods levels at stops along its route?static java.lang.String
TAG
static java.lang.String
UNIT_LAST_MOVE_DELAY
Whether to delay on a unit's last move or not.static java.lang.String
UNLOAD_OVERFLOW_RESPONSE
Set the default warehouse overflow on unload action.static int
UNLOAD_OVERFLOW_RESPONSE_ALWAYS
static int
UNLOAD_OVERFLOW_RESPONSE_ASK
static int
UNLOAD_OVERFLOW_RESPONSE_NEVER
static java.lang.String
USE_OPENGL
Enable use of openGL pipeline.static java.lang.String
USE_PIXMAPS
Pixmap setting to work around Java 2D graphics bug.static java.lang.String
USE_XRENDER
Enable use of XRender pipeline (unix specific).static java.lang.String
USER_MODS
The mods.private static java.lang.String
WAREHOUSE_GROUP
-
Fields inherited from class net.sf.freecol.common.option.AbstractOption
ACTION_TAG, DEFAULT_VALUE_TAG, isDefined
-
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ARRAY_SIZE_TAG, DEFAULT_CLASS_INDEX, fcoComparator, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE_TAG, VALUE_TAG
-
-
Constructor Summary
Constructors Constructor Description ClientOptions()
Creates a newClientOptions
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addBooleanOption(java.lang.String id, java.lang.String gr, boolean val)
private void
addIntegerOption(java.lang.String id, java.lang.String gr, int val)
private void
addOptionGroup(java.lang.String id, java.lang.String gr)
private void
addRangeOption(java.lang.String id, java.lang.String gr, int rank, java.util.Map<java.lang.Integer,java.lang.String> entries)
Add a new range option.private void
addTextOption(java.lang.String id, java.lang.String gr, java.lang.String val)
Add a new text option.void
fixClientOptions()
Perform backward compatibility fixups on new client options as they are introduced.java.util.List<FreeColModFile>
getActiveMods()
Gets a list of active mods in this ClientOptions.java.util.Comparator<Colony>
getColonyComparator()
Get the client's preferred comparator for colonies.private static java.util.Comparator<Colony>
getColonyComparatorInternal(int type)
Get the colony comparator identified by type.int
getDisplayTileText()
Get the client's preferred tile text type.java.util.Comparator<ModelMessage>
getModelMessageComparator(Game game)
Return the client's preferred comparator for ModelMessages.java.awt.Point
getPanelPosition(java.lang.String className)
Extract the panel position options for a given panel class name as a point.java.awt.Dimension
getPanelSize(java.lang.String className)
Extract the panel size options for a given panel class name as a dimension.static java.util.Map<java.lang.String,java.lang.String>
getSpecialOptions()
Extracts the special options from the client options file.java.lang.String
getXMLTagName()
Get the serialization tag for this object.private boolean
load(FreeColSavegameFile save)
Loads the options from the given save game.boolean
merge(java.io.File file)
Merge the options from the given file game.boolean
merge(FreeColSavegameFile save)
Merge the options from the given save game.private void
regroup(java.lang.String id, java.lang.String gr)
Move an option to a different group.-
Methods inherited from class net.sf.freecol.common.option.OptionGroup
add, cloneOption, generateChoices, getName, getOption, getOption, getOptions, getShortDescription, getValue, hasOption, hasOptionGroup, isEditable, isNullValueOK, isVisible, load, load, loadOptionGroup, merge, readAttributes, readChild, readChildren, remove, removeAll, save, setEditable, setValue, setValue, toString, writeAttributes, writeChildren
-
Methods inherited from class net.sf.freecol.common.option.AbstractOption
getEnabledBy, getGroup, readOption, setGroup, setValues
-
Methods inherited from class net.sf.freecol.common.model.FreeColSpecObject
copyIn, getSpecification, setSpecification
-
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addAbility, addFeatures, addModifier, addPropertyChangeListener, addPropertyChangeListener, apply, apply, applyModifiers, applyModifiers, arrayKey, compareIds, compareTo, containsAbilityKey, containsModifierKey, copy, copy, copy, copy, copyInCast, dumpObject, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAbilities, getAbilities, getAbilities, getAbilities, getClassIndex, getDefenceModifiers, getDisplayObject, getFeatureContainer, getFreeColObjectClass, getFreeColObjectClassByName, getGame, getId, getIdNumber, getIdType, getIdTypeByName, getModifiers, getModifiers, getModifiers, getModifiers, getObjectClassIndex, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getSortedAbilities, getSortedModifiers, getSuffix, getSuffix, hasAbility, hasAbility, hasAbility, hashCode, hasListeners, hasModifier, hasModifier, hasModifier, idEquals, invokeMethod, logFreeColObjects, readFromXML, readFromXMLPartial, removeAbilities, removeAbility, removeFeatures, removeModifier, removeModifiers, removePropertyChangeListener, removePropertyChangeListener, save, save, save, serialize, serialize, serialize, serialize, setGame, setId, toXML, toXML, toXMLPartial, toXMLPartial
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.freecol.common.ObjectWithId
getId
-
Methods inherited from interface net.sf.freecol.common.option.Option
readFromXML, toXML
-
Methods inherited from interface net.sf.freecol.common.option.OptionContainer
getBoolean, getFile, getInteger, getIntegerMinimum, getModList, getOptionGroup, getPercentage, getPercentageMultiplier, getRange, getSelection, getSelectionName, getString, getText, getUnitList, setBoolean, setFile, setInteger, setIntegerMinimum, setString, setText
-
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
PERSONAL_GROUP
private static final java.lang.String PERSONAL_GROUP
- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
Option for the player's preferred name.- See Also:
- Constant Field Values
-
LANGUAGE
public static final java.lang.String LANGUAGE
Special option for setting the language.- See Also:
- Constant Field Values
-
AUTOMATIC
public static final java.lang.String AUTOMATIC
Value for automatic language selection.- See Also:
- Constant Field Values
-
GUI_GROUP
private static final java.lang.String GUI_GROUP
- See Also:
- Constant Field Values
-
DISPLAY_GROUP
private static final java.lang.String DISPLAY_GROUP
- See Also:
- Constant Field Values
-
DISPLAY_SCALING
public static final java.lang.String DISPLAY_SCALING
Option to control the display scale factor.- See Also:
- Constant Field Values
-
MANUAL_MAIN_FONT_SIZE
public static final java.lang.String MANUAL_MAIN_FONT_SIZE
Enable manual override of main font size.- See Also:
- Constant Field Values
-
MAIN_FONT_SIZE
public static final java.lang.String MAIN_FONT_SIZE
Value to use to override the main font size, if enabled by the above.- See Also:
- Constant Field Values
-
USE_PIXMAPS
public static final java.lang.String USE_PIXMAPS
Pixmap setting to work around Java 2D graphics bug.- See Also:
- Constant Field Values
-
USE_OPENGL
public static final java.lang.String USE_OPENGL
Enable use of openGL pipeline.- See Also:
- Constant Field Values
-
USE_XRENDER
public static final java.lang.String USE_XRENDER
Enable use of XRender pipeline (unix specific).- See Also:
- Constant Field Values
-
MOVE_ANIMATION_SPEED
public static final java.lang.String MOVE_ANIMATION_SPEED
Animation speed for our units.- See Also:
- Constant Field Values
-
ENEMY_MOVE_ANIMATION_SPEED
public static final java.lang.String ENEMY_MOVE_ANIMATION_SPEED
Animation speed for enemy units.- See Also:
- Constant Field Values
-
FRIENDLY_MOVE_ANIMATION_SPEED
public static final java.lang.String FRIENDLY_MOVE_ANIMATION_SPEED
Animation speed for friendly units.- See Also:
- Constant Field Values
-
INTERFACE_GROUP
private static final java.lang.String INTERFACE_GROUP
- See Also:
- Constant Field Values
-
MAPVIEW_GROUP
private static final java.lang.String MAPVIEW_GROUP
- See Also:
- Constant Field Values
-
DEFAULT_ZOOM_LEVEL
public static final java.lang.String DEFAULT_ZOOM_LEVEL
Default zoom level of the minimap.- See Also:
- Constant Field Values
-
ALWAYS_CENTER
public static final java.lang.String ALWAYS_CENTER
Selected tiles always gets centered if this option is enabled (even if the tile is on screen.- See Also:
- Constant Field Values
-
JUMP_TO_ACTIVE_UNIT
public static final java.lang.String JUMP_TO_ACTIVE_UNIT
If this option is enabled, the display will recenter in order to display the active unit if it is not on screen.- See Also:
- Constant Field Values
-
MAP_SCROLL_ON_DRAG
public static final java.lang.String MAP_SCROLL_ON_DRAG
Option to scroll when dragging units on the mapboard.- See Also:
- Constant Field Values
-
AUTO_SCROLL
public static final java.lang.String AUTO_SCROLL
Option to auto-scroll on mouse movement.- See Also:
- Constant Field Values
-
DISPLAY_GRID
public static final java.lang.String DISPLAY_GRID
Whether to display the grid by default or not.- See Also:
- Constant Field Values
-
DISPLAY_BORDERS
public static final java.lang.String DISPLAY_BORDERS
Whether to display borders by default or not.- See Also:
- Constant Field Values
-
DISPLAY_FOG_OF_WAR
public static final java.lang.String DISPLAY_FOG_OF_WAR
Whether to draw the fog of war on the actual map or not.- See Also:
- Constant Field Values
-
UNIT_LAST_MOVE_DELAY
public static final java.lang.String UNIT_LAST_MOVE_DELAY
Whether to delay on a unit's last move or not.- See Also:
- Constant Field Values
-
DISPLAY_TILE_TEXT
public static final java.lang.String DISPLAY_TILE_TEXT
What text to display in the tiles.- See Also:
- Constant Field Values
-
DISPLAY_TILE_TEXT_EMPTY
public static final int DISPLAY_TILE_TEXT_EMPTY
- See Also:
- Constant Field Values
-
DISPLAY_TILE_TEXT_NAMES
public static final int DISPLAY_TILE_TEXT_NAMES
- See Also:
- Constant Field Values
-
DISPLAY_TILE_TEXT_OWNERS
public static final int DISPLAY_TILE_TEXT_OWNERS
- See Also:
- Constant Field Values
-
DISPLAY_TILE_TEXT_REGIONS
public static final int DISPLAY_TILE_TEXT_REGIONS
- See Also:
- Constant Field Values
-
DISPLAY_COLONY_LABELS
public static final java.lang.String DISPLAY_COLONY_LABELS
Style of colony labels.- See Also:
- Constant Field Values
-
COLONY_LABELS_NONE
public static final int COLONY_LABELS_NONE
- See Also:
- Constant Field Values
-
COLONY_LABELS_CLASSIC
public static final int COLONY_LABELS_CLASSIC
- See Also:
- Constant Field Values
-
COLONY_LABELS_MODERN
public static final int COLONY_LABELS_MODERN
- See Also:
- Constant Field Values
-
MAPCONTROLS_GROUP
private static final java.lang.String MAPCONTROLS_GROUP
- See Also:
- Constant Field Values
-
DISPLAY_COMPASS_ROSE
public static final java.lang.String DISPLAY_COMPASS_ROSE
Whether to display a compass rose or not.- See Also:
- Constant Field Values
-
DISPLAY_MAP_CONTROLS
public static final java.lang.String DISPLAY_MAP_CONTROLS
Whether to display the map controls or not.- See Also:
- Constant Field Values
-
MAP_CONTROLS
public static final java.lang.String MAP_CONTROLS
The type of map controls, corner or classic.- See Also:
- Constant Field Values
-
MAP_CONTROLS_CORNERS
public static final java.lang.String MAP_CONTROLS_CORNERS
Styles of map controls.- See Also:
- Constant Field Values
-
MAP_CONTROLS_CLASSIC
public static final java.lang.String MAP_CONTROLS_CLASSIC
- See Also:
- Constant Field Values
-
MINIMAP_TOGGLE_FOG_OF_WAR
public static final java.lang.String MINIMAP_TOGGLE_FOG_OF_WAR
Whether to draw the fog of war on the minimap.- See Also:
- Constant Field Values
-
MINIMAP_TOGGLE_BORDERS
public static final java.lang.String MINIMAP_TOGGLE_BORDERS
Whether to draw the borders on the minimap.- See Also:
- Constant Field Values
-
MINIMAP_BACKGROUND_COLOR
public static final java.lang.String MINIMAP_BACKGROUND_COLOR
The color to fill in around the actual map on the minimap. Typically only visible when the minimap is at full zoom-out, but at the default 'black' you can't differentiate between the background and the (unexplored) map. Actually: clientOptions.minimap.color.background- See Also:
- Constant Field Values
-
MESSAGES_GROUP
private static final java.lang.String MESSAGES_GROUP
- See Also:
- Constant Field Values
-
MESSAGES_GROUP_BY
public static final java.lang.String MESSAGES_GROUP_BY
Used by GUI, this defines the grouping of ModelMessages. Possible values include nothing, type and source.- See Also:
MapViewer
,ModelMessage
, Constant Field Values
-
MESSAGES_GROUP_BY_NOTHING
public static final int MESSAGES_GROUP_BY_NOTHING
- See Also:
- Constant Field Values
-
MESSAGES_GROUP_BY_TYPE
public static final int MESSAGES_GROUP_BY_TYPE
- See Also:
- Constant Field Values
-
MESSAGES_GROUP_BY_SOURCE
public static final int MESSAGES_GROUP_BY_SOURCE
- See Also:
- Constant Field Values
-
SHOW_GOODS_MOVEMENT
public static final java.lang.String SHOW_GOODS_MOVEMENT
Show goods movement messages. Used by followTradeRoute.- See Also:
- Constant Field Values
-
SHOW_COLONY_WARNINGS
public static final java.lang.String SHOW_COLONY_WARNINGS
Show warnings about colony sites.- See Also:
- Constant Field Values
-
SHOW_PRECOMBAT
public static final java.lang.String SHOW_PRECOMBAT
Show the pre-combat dialog?- See Also:
- Constant Field Values
-
SHOW_NOT_BEST_TILE
public static final java.lang.String SHOW_NOT_BEST_TILE
Show warnings about suboptimal colony tile choice.- See Also:
- Constant Field Values
-
SHOW_REGION_NAMING
public static final java.lang.String SHOW_REGION_NAMING
- See Also:
- Constant Field Values
-
COLONY_REPORT
public static final java.lang.String COLONY_REPORT
Option for selecting the compact colony report.- See Also:
- Constant Field Values
-
COLONY_REPORT_CLASSIC
public static final int COLONY_REPORT_CLASSIC
- See Also:
- Constant Field Values
-
COLONY_REPORT_COMPACT
public static final int COLONY_REPORT_COMPACT
- See Also:
- Constant Field Values
-
LABOUR_REPORT
public static final java.lang.String LABOUR_REPORT
The type of labour report to display.- See Also:
- Constant Field Values
-
LABOUR_REPORT_CLASSIC
public static final int LABOUR_REPORT_CLASSIC
- See Also:
- Constant Field Values
-
LABOUR_REPORT_COMPACT
public static final int LABOUR_REPORT_COMPACT
- See Also:
- Constant Field Values
-
WAREHOUSE_GROUP
private static final java.lang.String WAREHOUSE_GROUP
- See Also:
- Constant Field Values
-
CUSTOM_STOCK
public static final java.lang.String CUSTOM_STOCK
The amount of stock the custom house should keep when selling goods.- See Also:
- Constant Field Values
-
LOW_LEVEL
public static final java.lang.String LOW_LEVEL
Generate warning of stock drops below this percentage of capacity.- See Also:
- Constant Field Values
-
HIGH_LEVEL
public static final java.lang.String HIGH_LEVEL
Generate warning of stock exceeds this percentage of capacity.- See Also:
- Constant Field Values
-
STOCK_ACCOUNTS_FOR_PRODUCTION
public static final java.lang.String STOCK_ACCOUNTS_FOR_PRODUCTION
Should trade route units check production to determine goods levels at stops along its route?- See Also:
- Constant Field Values
-
OTHER_GROUP
private static final java.lang.String OTHER_GROUP
- See Also:
- Constant Field Values
-
REMEMBER_PANEL_POSITIONS
public static final java.lang.String REMEMBER_PANEL_POSITIONS
Whether to remember the positions of various dialogs and panels.- See Also:
- Constant Field Values
-
REMEMBER_PANEL_SIZES
public static final java.lang.String REMEMBER_PANEL_SIZES
Whether to remember the sizes of various dialogs and panels.- See Also:
- Constant Field Values
-
DISABLE_GRAY_LAYER
public static final java.lang.String DISABLE_GRAY_LAYER
Whether to display end turn grey background or not.- See Also:
- Constant Field Values
-
AUTOLOAD_EMIGRANTS
public static final java.lang.String AUTOLOAD_EMIGRANTS
Option to autoload emigrants on sailing to america.- See Also:
- Constant Field Values
-
AUTOLOAD_SENTRIES
public static final java.lang.String AUTOLOAD_SENTRIES
Option to autoload sentried units.- See Also:
- Constant Field Values
-
AUTO_END_TURN
public static final java.lang.String AUTO_END_TURN
Automatically end the turn when no units can be * made active.- See Also:
- Constant Field Values
-
SHOW_END_TURN_DIALOG
public static final java.lang.String SHOW_END_TURN_DIALOG
Show the end turn dialog.- See Also:
- Constant Field Values
-
INDIAN_DEMAND_RESPONSE
public static final java.lang.String INDIAN_DEMAND_RESPONSE
Set the default native demand action.- See Also:
- Constant Field Values
-
INDIAN_DEMAND_RESPONSE_ASK
public static final int INDIAN_DEMAND_RESPONSE_ASK
- See Also:
- Constant Field Values
-
INDIAN_DEMAND_RESPONSE_ACCEPT
public static final int INDIAN_DEMAND_RESPONSE_ACCEPT
- See Also:
- Constant Field Values
-
INDIAN_DEMAND_RESPONSE_REJECT
public static final int INDIAN_DEMAND_RESPONSE_REJECT
- See Also:
- Constant Field Values
-
UNLOAD_OVERFLOW_RESPONSE
public static final java.lang.String UNLOAD_OVERFLOW_RESPONSE
Set the default warehouse overflow on unload action.- See Also:
- Constant Field Values
-
UNLOAD_OVERFLOW_RESPONSE_ASK
public static final int UNLOAD_OVERFLOW_RESPONSE_ASK
- See Also:
- Constant Field Values
-
UNLOAD_OVERFLOW_RESPONSE_NEVER
public static final int UNLOAD_OVERFLOW_RESPONSE_NEVER
- See Also:
- Constant Field Values
-
UNLOAD_OVERFLOW_RESPONSE_ALWAYS
public static final int UNLOAD_OVERFLOW_RESPONSE_ALWAYS
- See Also:
- Constant Field Values
-
MIN_NUMBER_FOR_DISPLAYING_GOODS_COUNT
public static final java.lang.String MIN_NUMBER_FOR_DISPLAYING_GOODS_COUNT
Used by GUI, the number will be displayed when a group of goods are higher than this number.- See Also:
MapViewer
, Constant Field Values
-
MAX_NUMBER_OF_GOODS_IMAGES
public static final java.lang.String MAX_NUMBER_OF_GOODS_IMAGES
Used by GUI, this is the most repetitions drawn of a goods image for a single goods grouping.- See Also:
MapViewer
, Constant Field Values
-
MIN_NUMBER_FOR_DISPLAYING_GOODS
public static final java.lang.String MIN_NUMBER_FOR_DISPLAYING_GOODS
Used by GUI, this is the minimum number of goods a colony must possess for the goods to show up at the bottom of the colony panel.- See Also:
GUI
, Constant Field Values
-
COLONY_COMPARATOR
public static final java.lang.String COLONY_COMPARATOR
Used by GUI to sort colonies.- See Also:
- Constant Field Values
-
COLONY_COMPARATOR_NAME
public static final int COLONY_COMPARATOR_NAME
- See Also:
- Constant Field Values
-
COLONY_COMPARATOR_AGE
public static final int COLONY_COMPARATOR_AGE
- See Also:
- Constant Field Values
-
COLONY_COMPARATOR_POSITION
public static final int COLONY_COMPARATOR_POSITION
- See Also:
- Constant Field Values
-
COLONY_COMPARATOR_SIZE
public static final int COLONY_COMPARATOR_SIZE
- See Also:
- Constant Field Values
-
COLONY_COMPARATOR_SOL
public static final int COLONY_COMPARATOR_SOL
- See Also:
- Constant Field Values
-
SAVEGAMES_GROUP
private static final java.lang.String SAVEGAMES_GROUP
- See Also:
- Constant Field Values
-
SHOW_SAVEGAME_SETTINGS
public static final java.lang.String SHOW_SAVEGAME_SETTINGS
Use default values for savegames instead of displaying a dialog.- See Also:
- Constant Field Values
-
SHOW_SAVEGAME_SETTINGS_NEVER
public static final int SHOW_SAVEGAME_SETTINGS_NEVER
- See Also:
- Constant Field Values
-
SHOW_SAVEGAME_SETTINGS_MULTIPLAYER
public static final int SHOW_SAVEGAME_SETTINGS_MULTIPLAYER
- See Also:
- Constant Field Values
-
SHOW_SAVEGAME_SETTINGS_ALWAYS
public static final int SHOW_SAVEGAME_SETTINGS_ALWAYS
- See Also:
- Constant Field Values
-
AUTOSAVE_PERIOD
public static final java.lang.String AUTOSAVE_PERIOD
Option for setting the period of autosaves. The value 0 signals that autosaving is disabled.- See Also:
- Constant Field Values
-
AUTOSAVE_VALIDITY
public static final java.lang.String AUTOSAVE_VALIDITY
Option for setting the number of days autosaves are keep (valid time). If set to 0, valid time is not checked.- See Also:
- Constant Field Values
-
AUTOSAVE_DELETE
public static final java.lang.String AUTOSAVE_DELETE
Option for deleting autosaves when a new game is started. If set to true, old autosaves will be deleted if a new game is started.- See Also:
- Constant Field Values
-
CONFIRM_SAVE_OVERWRITE
public static final java.lang.String CONFIRM_SAVE_OVERWRITE
Whether to display confirmation for the overwrite of existing save files.- See Also:
- Constant Field Values
-
AUTO_SAVE_PREFIX
public static final java.lang.String AUTO_SAVE_PREFIX
Prefix for the auto-save file.- See Also:
- Constant Field Values
-
LAST_TURN_NAME
public static final java.lang.String LAST_TURN_NAME
Stem of the last-turn save file name.- See Also:
- Constant Field Values
-
BEFORE_LAST_TURN_NAME
public static final java.lang.String BEFORE_LAST_TURN_NAME
Stem of the before-last-turn save file name.- See Also:
- Constant Field Values
-
AUDIO_GROUP
private static final java.lang.String AUDIO_GROUP
- See Also:
- Constant Field Values
-
AUDIO_MIXER
public static final java.lang.String AUDIO_MIXER
Choose the default mixer.- See Also:
- Constant Field Values
-
AUDIO_VOLUME
public static final java.lang.String AUDIO_VOLUME
The volume level to set.- See Also:
- Constant Field Values
-
AUDIO_ALERTS
public static final java.lang.String AUDIO_ALERTS
Play an alert sound on message arrival.- See Also:
- Constant Field Values
-
USER_MODS
public static final java.lang.String USER_MODS
The mods.- See Also:
- Constant Field Values
-
ETC
public static final java.lang.String ETC
The dynamic placement options.- See Also:
- Constant Field Values
-
specialKeys
private static final java.util.List<java.lang.String> specialKeys
-
colonyAgeComparator
private static final java.util.Comparator<Colony> colonyAgeComparator
Compare by ascending age.
-
colonyNameComparator
private static java.util.concurrent.atomic.AtomicReference<java.util.Comparator<Colony>> colonyNameComparator
Compare by name, initialized at run time.
-
colonySizeComparator
private static final java.util.Comparator<Colony> colonySizeComparator
Compare by descending size then liberty.
-
colonySoLComparator
private static final java.util.Comparator<Colony> colonySoLComparator
Compare by descending liberty then size.
-
colonyPositionComparator
private static final java.util.Comparator<Colony> colonyPositionComparator
Compare by position on the map.
-
friendlyMoveAnimationSpeeds
private static final java.util.Map<java.lang.Integer,java.lang.String> friendlyMoveAnimationSpeeds
Friendly move animation speed option values.
-
-
Method Detail
-
load
private boolean load(FreeColSavegameFile save)
Loads the options from the given save game.- Parameters:
save
- TheFreeColSaveGame
to read the options from.- Returns:
- True if the options were loaded without error.
-
merge
public boolean merge(java.io.File file)
Merge the options from the given file game.- Parameters:
file
- TheFile
to merge the options from.- Returns:
- True if the options were merge without error.
-
merge
public boolean merge(FreeColSavegameFile save)
Merge the options from the given save game.- Parameters:
save
- TheFreeColSaveGame
to merge from.- Returns:
- True if the options were merged without error.
-
getActiveMods
public java.util.List<FreeColModFile> getActiveMods()
Gets a list of active mods in this ClientOptions.- Returns:
- A list of active mods.
-
getDisplayTileText
public int getDisplayTileText()
Get the client's preferred tile text type.- Returns:
- A
DISPLAY_TILE_TEXT_
value
-
getColonyComparator
public java.util.Comparator<Colony> getColonyComparator()
Get the client's preferred comparator for colonies.- Returns:
- The current colony
Comparator
.
-
getColonyComparatorInternal
private static java.util.Comparator<Colony> getColonyComparatorInternal(int type)
Get the colony comparator identified by type.- Parameters:
type
- The colony comparator option integer value.- Returns:
- The corresponding colony
Comparator
.
-
getModelMessageComparator
public java.util.Comparator<ModelMessage> getModelMessageComparator(Game game)
Return the client's preferred comparator for ModelMessages.- Parameters:
game
- TheGame
to extract a comparator for.- Returns:
- The preferred
Comparator
.
-
fixClientOptions
public void fixClientOptions()
Perform backward compatibility fixups on new client options as they are introduced. Annotate with introduction version so we can clean these up as they become standard.
-
addBooleanOption
private void addBooleanOption(java.lang.String id, java.lang.String gr, boolean val)
-
addIntegerOption
private void addIntegerOption(java.lang.String id, java.lang.String gr, int val)
-
addOptionGroup
private void addOptionGroup(java.lang.String id, java.lang.String gr)
-
addRangeOption
private void addRangeOption(java.lang.String id, java.lang.String gr, int rank, java.util.Map<java.lang.Integer,java.lang.String> entries)
Add a new range option.- Parameters:
id
- The option identifier.gr
- The group identifier.rank
- The option rank.entries
- The options in the range.
-
addTextOption
private void addTextOption(java.lang.String id, java.lang.String gr, java.lang.String val)
Add a new text option.- Parameters:
id
- The option identifier.gr
- The group identifier.val
- The the text value.
-
regroup
private void regroup(java.lang.String id, java.lang.String gr)
Move an option to a different group.- Parameters:
id
- The identifier for the option to move.gr
- The identifier for the option group to move to.
-
getPanelPosition
public java.awt.Point getPanelPosition(java.lang.String className)
Extract the panel position options for a given panel class name as a point.- Parameters:
className
- The panel class name.- Returns:
- A
Point
for the position if found, else null.
-
getPanelSize
public java.awt.Dimension getPanelSize(java.lang.String className)
Extract the panel size options for a given panel class name as a dimension.- Parameters:
className
- The panel class name.- Returns:
- A
Dimension
for the size if found, else null.
-
getSpecialOptions
public static java.util.Map<java.lang.String,java.lang.String> getSpecialOptions() throws FreeColException
Extracts the special options from the client options file. Note: called early, the logger is not yet reliably available.- Returns:
- A map of the special options and the values found for them.
- Throws:
FreeColException
- if there is a problem reading the stream.
-
getXMLTagName
public java.lang.String getXMLTagName()
Get the serialization tag for this object.- Overrides:
getXMLTagName
in classOptionGroup
- Returns:
- The tag.
-
-