|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.option.AbstractOption
net.sf.freecol.common.option.OptionGroup
net.sf.freecol.common.option.OptionMap
net.sf.freecol.client.ClientOptions
public class ClientOptions
Defines how available client options are displayed on the Setting dialog from
File>Preferences Also contains several Comparators used for display purposes.
New options should be added to addDefaultOptions()
and each option
should be given an unique identifier (defined as a constant in this class,
then as fully-qualified strings in FreeColMessages.properties). Identifiers
like "guiShowSonsOfLiberty" actually REQUIRE string keys of:
clientOptions.messages.guiShowSonsOfLiberty.name
clientOptions.messages.guiShowSonsOfLiberty.shortDescription So be sure to
include both.
Field Summary | |
---|---|
static java.lang.String |
ALWAYS_CENTER
Selected tiles always gets centered if this option is enabled (even if the tile is GUI.onScreen(Map.Position) ). |
static java.lang.String |
AUDIO_MIXER
|
static java.lang.String |
AUTO_END_TURN
If enabled: Automatically ends the turn when no units can be made active. |
static java.lang.String |
AUTO_SCROLL
Option for activating autoscroll when dragging units on the mapboard. |
static java.lang.String |
AUTOLOAD_EMIGRANTS
Option for autoload emigrants on saling to america. |
static java.lang.String |
AUTOSAVE_DELETE
Option for deleting autosaves when a new game is started. |
static java.lang.String |
AUTOSAVE_GENERATIONS
Option for setting the number of autosaves to keep. |
static java.lang.String |
AUTOSAVE_PERIOD
Option for setting the period of autosaves. |
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 java.lang.String |
CUSTOM_STOCK
The Stock the custom house should keep when selling goods. |
static java.lang.String |
DEFAULT_MINIMAP_ZOOM
Default zoom level of the minimap. |
static java.lang.String |
DISPLAY_BORDERS
Whether to display borders by default or not. |
static java.lang.String |
DISPLAY_COMPASS_ROSE
Whether to display a compass rose or not. |
static java.lang.String |
DISPLAY_FOG_OF_WAR
Option for setting wether or not the fog of war should be displayed. |
static java.lang.String |
DISPLAY_GRID
Whether to display the grid by default or not. |
static java.lang.String |
DISPLAY_MAP_CONTROLS
Whether to display the map controls or not. |
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 |
HIGH_LEVEL
Generate warning of stock exceeds this percentage of capacity. |
static java.lang.String |
INDIAN_DEMAND_RESPONSE
The Indian demand action. |
static int |
INDIAN_DEMAND_RESPONSE_ACCEPT
|
static int |
INDIAN_DEMAND_RESPONSE_ASK
|
static int |
INDIAN_DEMAND_RESPONSE_REJECT
|
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 GUI.onScreen(Map.Position) ). |
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
Option for setting the language. |
static java.lang.String |
LOW_LEVEL
Generate warning of stock drops below this percentage of capacity. |
static java.lang.String |
MAP_SCROLL_ON_DRAG
Option for activating autoscroll when dragging units on the mapboard. |
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. |
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 |
MOVE_ANIMATION_SPEED
Animation speed for friendly units. |
static java.lang.String |
MUSIC_VOLUME
|
static java.lang.String |
SFX_VOLUME
|
static java.lang.String |
SHOW_BUILDING_COMPLETED
|
static java.lang.String |
SHOW_COLONY_WARNINGS
|
static java.lang.String |
SHOW_FOREIGN_DIPLOMACY
|
static java.lang.String |
SHOW_GOVERNMENT_EFFICIENCY
|
static java.lang.String |
SHOW_MARKET_PRICES
|
static java.lang.String |
SHOW_MISSING_GOODS
|
static java.lang.String |
SHOW_NOT_BEST_TILE
|
static java.lang.String |
SHOW_PRECOMBAT
|
static java.lang.String |
SHOW_SAVEGAME_SETTINGS
Use default values for savegames instead of displaying a dialog. |
static int |
SHOW_SAVEGAME_SETTINGS_ALWAYS
A possible value for the SelectOption :
SHOW_SAVEGAME_SETTINGS . |
static int |
SHOW_SAVEGAME_SETTINGS_MULTIPLAYER
A possible value for the SelectOption :
SHOW_SAVEGAME_SETTINGS . |
static int |
SHOW_SAVEGAME_SETTINGS_NEVER
A possible value for the SelectOption :
SHOW_SAVEGAME_SETTINGS . |
static java.lang.String |
SHOW_SONS_OF_LIBERTY
Used by GUI, this defines whether SoL messages will be displayed. |
static java.lang.String |
SHOW_TUTORIAL
|
static java.lang.String |
SHOW_UNIT_ADDED
|
static java.lang.String |
SHOW_UNIT_DEMOTED
|
static java.lang.String |
SHOW_UNIT_IMPROVED
|
static java.lang.String |
SHOW_UNIT_LOST
|
static java.lang.String |
SHOW_WAREHOUSE_CAPACITY
|
static java.lang.String |
SHOW_WARNING
|
static java.lang.String |
SMOOTH_MINIMAP_RENDERING
If selected: Enables smooth rendering of the minimap when zoomed out. |
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
The 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 |
USER_MODS
|
Fields inherited from class net.sf.freecol.common.option.AbstractOption |
---|
NO_ID |
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
ClientOptions()
Creates a new ClientOptions . |
|
ClientOptions(org.w3c.dom.Element element)
Creates a ClientOptions from an XML representation. |
Method Summary | |
---|---|
BooleanOption |
getBooleanOption(ModelMessage message)
Returns the boolean option associated with a ModelMessage. |
java.util.Comparator<Colony> |
getColonyComparator()
Return the client's preferred comparator for colonies. |
static java.util.Comparator<Colony> |
getColonyComparator(int type)
Return the colony comparator identified by type. |
int |
getDisplayTileText()
Return the client's preferred tile text type. |
java.util.Comparator<ModelMessage> |
getModelMessageComparator()
Return the client's preferred comparator for ModelMessages. |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
Methods inherited from class net.sf.freecol.common.option.OptionMap |
---|
addToMap, getBoolean, getFile, getInteger, getObject, load, putOption, save, setFile, toXML |
Methods inherited from class net.sf.freecol.common.option.OptionGroup |
---|
add, getName, getShortDescription, iterator, removeAll |
Methods inherited from class net.sf.freecol.common.option.AbstractOption |
---|
getGroup, isPreviewEnabled, setGroup, setPreviewEnabled, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.freecol.common.option.Option |
---|
addPropertyChangeListener, getId, readFromXML, readFromXMLElement, removePropertyChangeListener, toXMLElement |
Field Detail |
---|
public static final java.lang.String LANGUAGE
public static final java.lang.String JUMP_TO_ACTIVE_UNIT
GUI.onScreen(Map.Position)
).
GUI
,
Constant Field Valuespublic static final java.lang.String ALWAYS_CENTER
GUI.onScreen(Map.Position)
).
GUI
,
Constant Field Valuespublic static final java.lang.String MIN_NUMBER_FOR_DISPLAYING_GOODS
GUI
,
Constant Field Valuespublic static final java.lang.String MIN_NUMBER_FOR_DISPLAYING_GOODS_COUNT
GUI
,
Constant Field Valuespublic static final java.lang.String MAX_NUMBER_OF_GOODS_IMAGES
GUI
,
Constant Field Valuespublic static final java.lang.String DISPLAY_COMPASS_ROSE
public static final java.lang.String DISPLAY_MAP_CONTROLS
public static final java.lang.String DISPLAY_GRID
public static final java.lang.String UNIT_LAST_MOVE_DELAY
public static final java.lang.String DISPLAY_BORDERS
public static final java.lang.String DISPLAY_TILE_TEXT
public static final int DISPLAY_TILE_TEXT_EMPTY
public static final int DISPLAY_TILE_TEXT_NAMES
public static final int DISPLAY_TILE_TEXT_OWNERS
public static final int DISPLAY_TILE_TEXT_REGIONS
public static final java.lang.String MOVE_ANIMATION_SPEED
public static final java.lang.String ENEMY_MOVE_ANIMATION_SPEED
public static final java.lang.String MESSAGES_GROUP_BY
GUI
,
ModelMessage
,
Constant Field Valuespublic static final int MESSAGES_GROUP_BY_NOTHING
public static final int MESSAGES_GROUP_BY_TYPE
public static final int MESSAGES_GROUP_BY_SOURCE
public static final java.lang.String AUDIO_MIXER
public static final java.lang.String MUSIC_VOLUME
public static final java.lang.String SFX_VOLUME
public static final java.lang.String SHOW_SONS_OF_LIBERTY
GUI
,
Constant Field Valuespublic static final java.lang.String SHOW_WARNING
public static final java.lang.String SHOW_GOVERNMENT_EFFICIENCY
public static final java.lang.String SHOW_WAREHOUSE_CAPACITY
public static final java.lang.String SHOW_UNIT_IMPROVED
public static final java.lang.String SHOW_UNIT_DEMOTED
public static final java.lang.String SHOW_UNIT_ADDED
public static final java.lang.String SHOW_UNIT_LOST
public static final java.lang.String SHOW_BUILDING_COMPLETED
public static final java.lang.String SHOW_FOREIGN_DIPLOMACY
public static final java.lang.String SHOW_MARKET_PRICES
public static final java.lang.String SHOW_MISSING_GOODS
public static final java.lang.String SHOW_TUTORIAL
public static final java.lang.String SHOW_COLONY_WARNINGS
public static final java.lang.String SHOW_PRECOMBAT
public static final java.lang.String SHOW_NOT_BEST_TILE
public static final java.lang.String SHOW_SAVEGAME_SETTINGS
public static final int SHOW_SAVEGAME_SETTINGS_NEVER
SelectOption
:
SHOW_SAVEGAME_SETTINGS
. Specifies that the dialog should never
be enabled.
public static final int SHOW_SAVEGAME_SETTINGS_MULTIPLAYER
SelectOption
:
SHOW_SAVEGAME_SETTINGS
. Specifies that the dialog should only
be enabled when loading savegames being marked as multiplayer..
public static final int SHOW_SAVEGAME_SETTINGS_ALWAYS
SelectOption
:
SHOW_SAVEGAME_SETTINGS
. Specifies that the dialog should always
be enabled.
public static final java.lang.String AUTOSAVE_PERIOD
public static final java.lang.String AUTOSAVE_GENERATIONS
public static final java.lang.String AUTOSAVE_DELETE
public static final java.lang.String DISPLAY_FOG_OF_WAR
public static final java.lang.String MAP_SCROLL_ON_DRAG
public static final java.lang.String AUTO_SCROLL
public static final java.lang.String AUTOLOAD_EMIGRANTS
public static final java.lang.String SMOOTH_MINIMAP_RENDERING
public static final java.lang.String DEFAULT_MINIMAP_ZOOM
public static final java.lang.String MINIMAP_BACKGROUND_COLOR
public static final java.lang.String USER_MODS
public static final java.lang.String CUSTOM_STOCK
public static final java.lang.String LOW_LEVEL
public static final java.lang.String HIGH_LEVEL
public static final java.lang.String COLONY_COMPARATOR
public static final int COLONY_COMPARATOR_NAME
public static final int COLONY_COMPARATOR_AGE
public static final int COLONY_COMPARATOR_POSITION
public static final int COLONY_COMPARATOR_SIZE
public static final int COLONY_COMPARATOR_SOL
public static final java.lang.String AUTO_END_TURN
public static final java.lang.String LABOUR_REPORT
public static final int LABOUR_REPORT_CLASSIC
public static final int LABOUR_REPORT_COMPACT
public static final java.lang.String INDIAN_DEMAND_RESPONSE
public static final int INDIAN_DEMAND_RESPONSE_ASK
public static final int INDIAN_DEMAND_RESPONSE_ACCEPT
public static final int INDIAN_DEMAND_RESPONSE_REJECT
public static final java.lang.String UNLOAD_OVERFLOW_RESPONSE
public static final int UNLOAD_OVERFLOW_RESPONSE_ASK
public static final int UNLOAD_OVERFLOW_RESPONSE_NEVER
public static final int UNLOAD_OVERFLOW_RESPONSE_ALWAYS
Constructor Detail |
---|
public ClientOptions()
ClientOptions
.
public ClientOptions(org.w3c.dom.Element element)
ClientOptions
from an XML representation.
element
- The XML Element
from which this object
should be constructed.Method Detail |
---|
public int getDisplayTileText()
DISPLAY_TILE_TEXT_
valuepublic java.util.Comparator<Colony> getColonyComparator()
Comparator
valuepublic static java.util.Comparator<Colony> getColonyComparator(int type)
type
- an int
value
Comparator
valuepublic java.util.Comparator<ModelMessage> getModelMessageComparator()
Comparator
valuepublic BooleanOption getBooleanOption(ModelMessage message)
message
- a ModelMessage
value
BooleanOption
valuepublic static java.lang.String getXMLElementTagName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |