Package fr.formiko.usuel
Class Options
java.lang.Object
fr.formiko.usuel.Options
- All Implemented Interfaces:
 Serializable
Options class.
It contain all globals options and can save it.
It contain all globals options and can save it.
- Author:
 - Hydrolien
 - See Also:
 - Serialized Form
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate Fontprivate Fontprivate booleanprivate booleanprivate booleanprivate bytelanguage can be save as byte or String in properties & options file.private Stringprivate booleanprivate booleanprivate byteprivate byteprivate Stringprivate intprivate intprivate Stringprivate Stringprivate booleanprivate intprivate intprivate intprivate booleanprivate byteprivate byteprivate booleanprivate booleanprivate booleanprivate byteprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate booleanprivate byteprivate booleanprivate booleanprivate byteprivate intprivate byteprivate booleanprivate booleanprivate booleanprivate booleanprivate byteprivate booleanprivate SortedPropertiesprivate booleanprivate byteprivate booleanprivate byte - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleangetAffG()booleanbytebooleanbooleanbytebooleangetBSon()intintintprivate SortedPropertiesget defaultProperties of the Options.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbytebooleanbooleangetError()booleangetFont1()getFont2()intintgetFontTitle(String s)Return a font that can display given String.booleanbooleanintgetFps()intintbooleanbooleanbooleanbytebooleanbytebooleanbooleanbooleanbooleanbooleanbytebooleanbyteintbytebytebooleanbooleanvoidInitialize Options.private voidInitialize properties of the Options.static OptionsBuilder with only default properties.private voidtranform properties into Options var.private voidtranform properties into Options var.private voidSave default properties.private voidsaveOp()Save Options.voidvoidsaveOptions(boolean threaded)Save Options.private voidSave properties of the Options.voidsetAffG(boolean b)voidsetAnimationEnable(boolean b)voidsetAntColorLevel(byte x)voidsetAutoCleaning(boolean b)voidsetBMusic(boolean b)voidsetBorderButtonSize(int x)voidsetBSon(boolean b)voidsetbuttonSizeAction(byte x)voidsetbuttonSizeTX(byte x)voidsetbuttonSizeZoom(byte x)voidsetDateFormat(String s)voidsetDiscordRP(boolean b)voidsetDrawAllAnthillColor(boolean x)voidsetDrawAllyCreatures(boolean b)voidsetDrawDrawBlades(boolean b)voidsetDrawEnemyCreatures(boolean b)voidsetDrawGrid(boolean b)voidsetDrawNeutralCreatures(boolean b)voidsetDrawOnlyEatable(boolean b)voidsetDrawPlayerMessagePanel(boolean x)voidsetDrawRelationsIcons(boolean b)voidsetDrawSeeds(boolean b)voidsetDrawStatesIconsLevel(byte b)voidsetEndTurnAuto(boolean b)voidsetError(boolean b)voidsetFollowAntAtStartTurn(boolean b)voidvoidvoidsetFontSizeText(int x)voidsetFontSizeTitle(int x)voidsetFontText(String s)voidsetFontTitle(String s)voidsetFontTitlePersonalised(boolean b)voidsetForceQuit(boolean b)voidsetFps(int b)voidsetFrameHeight(int x)voidsetFrameWidth(int x)voidsetFullscreen(boolean b)voidsetInstantaneousMovement(boolean b)voidsetKeepFilesRotated(boolean b)voidsetLanguage(byte x)Set language of Options & Locale.voidsetLanguage(int x)voidsetLoadingDuringMenus(boolean b)voidsetMaxMessageDisplay(int x)voidsetMessage(boolean b)voidsetModeFPS(boolean b)voidsetOrientedObjectOnMap(boolean b)voidsetPaintHitBox(boolean b)voidsetPerformance(boolean b)voidsetPositionCase(byte x)voidvoidsetQuickMovement(boolean b)voidsetRealisticSize(byte x)voidsetRealisticSize(int x)voidsetSizeOfMapLines(int x)voidsetVolMusic(byte x)voidsetVolSon(byte x)voidsetWaring(boolean b)voidsetWhaitBeforeLaunchGame(boolean b)private inttailleBouton(byte x)tranform a byte into a button size.voidupdate the 2 font. 
- 
Field Details
- 
game_endTurnAuto
private boolean game_endTurnAuto - 
game_forceQuit
private boolean game_forceQuit - 
game_language
private byte game_languagelanguage can be save as byte or String in properties & options file. - 
game_pseudo
 - 
game_whaitBeforeLaunchGame
private boolean game_whaitBeforeLaunchGame - 
game_discordRP
private boolean game_discordRP - 
partie_autoCleaning
private boolean partie_autoCleaning - 
debug_error
private boolean debug_error - 
debug_alerte
private boolean debug_alerte - 
debug_info
private boolean debug_info - 
debug_message
private boolean debug_message - 
debug_performance
private boolean debug_performance - 
debug_gui
private boolean debug_gui - 
debug_paintHitBox
private boolean debug_paintHitBox - 
sounds_music
private boolean sounds_music - 
sounds_sound
private boolean sounds_sound - 
sounds_musicVolume
private byte sounds_musicVolume - 
sounds_soundVolume
private byte sounds_soundVolume - 
gui_hide_buttonSizeZoom
private byte gui_hide_buttonSizeZoom - 
gui_global_buttonSizeAction
private byte gui_global_buttonSizeAction - 
gui_hide_buttonSizeTX
private byte gui_hide_buttonSizeTX - 
gui_partie_quickMovement
private boolean gui_partie_quickMovement - 
gui_partie_instantaneousMovement
private boolean gui_partie_instantaneousMovement - 
gui_partie_orientedObjectOnMap
private boolean gui_partie_orientedObjectOnMap - 
gui_partie_maxMessageDisplay
private byte gui_partie_maxMessageDisplay - 
gui_partie_drawSeeds
private boolean gui_partie_drawSeeds - 
gui_partie_drawAllyCreatures
private boolean gui_partie_drawAllyCreatures - 
gui_partie_drawNeutralCreatures
private boolean gui_partie_drawNeutralCreatures - 
gui_partie_drawEnemyCreatures
private boolean gui_partie_drawEnemyCreatures - 
gui_partie_drawOnlyEatable
private boolean gui_partie_drawOnlyEatable - 
gui_partie_drawBlades
private boolean gui_partie_drawBlades - 
gui_pgo_drawGrid
private boolean gui_pgo_drawGrid - 
gui_global_borderButtonSize
private byte gui_global_borderButtonSize - 
gui_pgo_drawRelationsIcons
private boolean gui_pgo_drawRelationsIcons - 
gui_pgo_drawStatesIconsLevel
private byte gui_pgo_drawStatesIconsLevel - 
gui_global_fontSizeText
private int gui_global_fontSizeText - 
gui_global_fontSizeTitle
private int gui_global_fontSizeTitle - 
gui_global_fontText
 - 
gui_global_fontTitle
 - 
gui_global_fontTitlePersonalised
private boolean gui_global_fontTitlePersonalised - 
gui_global_fullscreen
private boolean gui_global_fullscreen - 
gui_global_frameWidth
private int gui_global_frameWidth - 
gui_global_frameHeight
private int gui_global_frameHeight - 
gui_hide_loadingDuringMenus
private boolean gui_hide_loadingDuringMenus - 
gui_hide_keepFilesRotated
private boolean gui_hide_keepFilesRotated - 
gui_partie_sizeOfMapLines
private int gui_partie_sizeOfMapLines - 
gui_partie_followAntAtStartTurn
private boolean gui_partie_followAntAtStartTurn - 
gui_hide_positionCase
private byte gui_hide_positionCase - 
gui_partie_realisticSize
private byte gui_partie_realisticSize - 
gui_hide_modeFPS
private boolean gui_hide_modeFPS - 
gui_global_fps
private int gui_global_fps - 
gui_global_animationEnable
private boolean gui_global_animationEnable - 
gui_global_dateFormat
 - 
gui_pgo_antColorLevel
private byte gui_pgo_antColorLevel - 
gui_pgo_drawAllAnthillColor
private boolean gui_pgo_drawAllAnthillColor - 
gui_pgo_drawPlayerMessagePanel
private boolean gui_pgo_drawPlayerMessagePanel - 
font1
 - 
font2
 - 
properties
 
 - 
 - 
Constructor Details
- 
Options
public Options() 
 - 
 - 
Method Details
- 
newDefaultOptions
Builder with only default properties. - 
getLanguage
public byte getLanguage() - 
setLanguage
public void setLanguage(byte x)Set language of Options & Locale. - 
setLanguage
public void setLanguage(int x) - 
getbuttonSizeZoom
public int getbuttonSizeZoom() - 
setbuttonSizeZoom
public void setbuttonSizeZoom(byte x) - 
getbuttonSizeAction
public int getbuttonSizeAction() - 
setbuttonSizeAction
public void setbuttonSizeAction(byte x) - 
getbuttonSizeTX
public int getbuttonSizeTX() - 
setbuttonSizeTX
public void setbuttonSizeTX(byte x) - 
getQuickMovement
public boolean getQuickMovement() - 
setQuickMovement
public void setQuickMovement(boolean b) - 
getDrawSeeds
public boolean getDrawSeeds() - 
setDrawSeeds
public void setDrawSeeds(boolean b) - 
getDrawOnlyEatable
public boolean getDrawOnlyEatable() - 
setDrawOnlyEatable
public void setDrawOnlyEatable(boolean b) - 
getDrawBlades
public boolean getDrawBlades() - 
setDrawDrawBlades
public void setDrawDrawBlades(boolean b) - 
getDrawEnemyCreatures
public boolean getDrawEnemyCreatures() - 
setDrawEnemyCreatures
public void setDrawEnemyCreatures(boolean b) - 
getDrawNeutralCreatures
public boolean getDrawNeutralCreatures() - 
setDrawNeutralCreatures
public void setDrawNeutralCreatures(boolean b) - 
getDrawAllyCreatures
public boolean getDrawAllyCreatures() - 
setDrawAllyCreatures
public void setDrawAllyCreatures(boolean b) - 
getInstantaneousMovement
public boolean getInstantaneousMovement() - 
setInstantaneousMovement
public void setInstantaneousMovement(boolean b) - 
getOrientedObjectOnMap
public boolean getOrientedObjectOnMap() - 
setOrientedObjectOnMap
public void setOrientedObjectOnMap(boolean b) - 
getMaxMessageDisplay
public byte getMaxMessageDisplay() - 
setMaxMessageDisplay
public void setMaxMessageDisplay(int x) - 
getDrawGrid
public boolean getDrawGrid() - 
setDrawGrid
public void setDrawGrid(boolean b) - 
getForceQuit
public boolean getForceQuit() - 
setForceQuit
public void setForceQuit(boolean b) - 
getBorderButtonSize
public byte getBorderButtonSize() - 
setBorderButtonSize
public void setBorderButtonSize(int x) - 
getDrawRelationsIcons
public boolean getDrawRelationsIcons() - 
setDrawRelationsIcons
public void setDrawRelationsIcons(boolean b) - 
getDrawStatesIconsLevel
public byte getDrawStatesIconsLevel() - 
setDrawStatesIconsLevel
public void setDrawStatesIconsLevel(byte b) - 
getFont1
 - 
getFont1
 - 
setFont1
 - 
getFont2
 - 
getFontTitle
Return a font that can display given String.- Parameters:
 s- String to test displayability.
 - 
setFont2
 - 
getFontSizeText
public int getFontSizeText() - 
setFontSizeText
public void setFontSizeText(int x) - 
getFontSizeTitle
public int getFontSizeTitle() - 
setFontSizeTitle
public void setFontSizeTitle(int x) - 
getFontText
 - 
setFontText
 - 
getFontTitle
 - 
setFontTitle
 - 
getPseudo
 - 
setPseudo
 - 
getFullscreen
public boolean getFullscreen() - 
setFullscreen
public void setFullscreen(boolean b) - 
getFrameWidth
public int getFrameWidth() - 
setFrameWidth
public void setFrameWidth(int x) - 
getFrameHeight
public int getFrameHeight() - 
setFrameHeight
public void setFrameHeight(int x) - 
getLoadingDuringMenus
public boolean getLoadingDuringMenus() - 
setLoadingDuringMenus
public void setLoadingDuringMenus(boolean b) - 
getKeepFilesRotated
public boolean getKeepFilesRotated() - 
setKeepFilesRotated
public void setKeepFilesRotated(boolean b) - 
getWhaitBeforeLaunchGame
public boolean getWhaitBeforeLaunchGame() - 
setWhaitBeforeLaunchGame
public void setWhaitBeforeLaunchGame(boolean b) - 
getDiscordRP
public boolean getDiscordRP() - 
setDiscordRP
public void setDiscordRP(boolean b) - 
getMessage
public boolean getMessage() - 
setMessage
public void setMessage(boolean b) - 
getError
public boolean getError() - 
setError
public void setError(boolean b) - 
getWarning
public boolean getWarning() - 
setWaring
public void setWaring(boolean b) - 
getPerformance
public boolean getPerformance() - 
setPerformance
public void setPerformance(boolean b) - 
getAffG
public boolean getAffG() - 
setAffG
public void setAffG(boolean b) - 
getPaintHitBox
public boolean getPaintHitBox() - 
setPaintHitBox
public void setPaintHitBox(boolean b) - 
getSizeOfMapLines
public int getSizeOfMapLines() - 
setSizeOfMapLines
public void setSizeOfMapLines(int x) - 
getFollowAntAtStartTurn
public boolean getFollowAntAtStartTurn() - 
setFollowAntAtStartTurn
public void setFollowAntAtStartTurn(boolean b) - 
getPositionCase
public byte getPositionCase() - 
setPositionCase
public void setPositionCase(byte x) - 
getBMusic
public boolean getBMusic() - 
setBMusic
public void setBMusic(boolean b) - 
getBSon
public boolean getBSon() - 
setBSon
public void setBSon(boolean b) - 
getVolMusic
public byte getVolMusic() - 
setVolMusic
public void setVolMusic(byte x) - 
getVolSon
public byte getVolSon() - 
setVolSon
public void setVolSon(byte x) - 
getRealisticSize
public byte getRealisticSize() - 
setRealisticSize
public void setRealisticSize(byte x) - 
setRealisticSize
public void setRealisticSize(int x) - 
getAutoCleaning
public boolean getAutoCleaning() - 
setAutoCleaning
public void setAutoCleaning(boolean b) - 
getModeFPS
public boolean getModeFPS() - 
setModeFPS
public void setModeFPS(boolean b) - 
getFps
public int getFps() - 
setFps
public void setFps(int b) - 
getAntColorLevel
public byte getAntColorLevel() - 
setAntColorLevel
public void setAntColorLevel(byte x) - 
getDrawAllAnthillColor
public boolean getDrawAllAnthillColor() - 
setDrawAllAnthillColor
public void setDrawAllAnthillColor(boolean x) - 
getDrawPlayerMessagePanel
public boolean getDrawPlayerMessagePanel() - 
setDrawPlayerMessagePanel
public void setDrawPlayerMessagePanel(boolean x) - 
getEndTurnAuto
public boolean getEndTurnAuto() - 
setEndTurnAuto
public void setEndTurnAuto(boolean b) - 
getAnimationEnable
public boolean getAnimationEnable() - 
setAnimationEnable
public void setAnimationEnable(boolean b) - 
getFontTitlePersonalised
public boolean getFontTitlePersonalised() - 
setFontTitlePersonalised
public void setFontTitlePersonalised(boolean b) - 
getDateFormat
 - 
setDateFormat
 - 
iniOptions
public void iniOptions()Initialize Options.
It load properties from Option.md, transform it to all the Option value & delete properties. - 
saveOptions
public void saveOptions(boolean threaded)Save Options.
It load properties from data of Options.java, transform it to properties & then destory properties.- Parameters:
 threaded- true if we can do the save in an other tread
 - 
saveOptions
public void saveOptions() - 
saveOp
private void saveOp()Save Options. - 
iniProperties
private void iniProperties()Initialize properties of the Options. - 
saveProperties
private void saveProperties()Save properties of the Options. - 
saveDeflautProperties
private void saveDeflautProperties()Save default properties. - 
getDefaultProperties
get defaultProperties of the Options.
It can be used to save default Options or to repair Options.md file if something is mising.
Value for version, language, fontSize & butonSize depend of the user computer. - 
tailleBouton
private int tailleBouton(byte x)tranform a byte into a button size. - 
propertiesToOptions
private void propertiesToOptions()tranform properties into Options var. - 
updateFont
public void updateFont()update the 2 font. - 
optionToProperties
private void optionToProperties()tranform properties into Options var. 
 -