2017-11-15 21:53:52 +00:00
|
|
|
package model;
|
|
|
|
|
|
|
|
import Classes.Languages;
|
|
|
|
|
|
|
|
public class LangModel {
|
2017-11-19 15:30:22 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
private static LangModel instance;
|
2017-11-19 15:30:22 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
private Languages fromLang = Languages.fr;
|
2017-11-19 15:30:22 +00:00
|
|
|
private Languages toLang = Languages.en;
|
|
|
|
|
|
|
|
|
|
|
|
private LangModel(){}
|
|
|
|
|
|
|
|
public static LangModel getInstance(){
|
|
|
|
if( LangModel.instance == null )
|
2017-11-15 21:53:52 +00:00
|
|
|
LangModel.instance = new LangModel();
|
2017-11-19 15:30:22 +00:00
|
|
|
|
2017-11-15 21:53:52 +00:00
|
|
|
return LangModel.instance;
|
|
|
|
}
|
2017-11-19 15:30:22 +00:00
|
|
|
|
|
|
|
public void setFromLang(Languages lang){
|
2017-11-15 21:53:52 +00:00
|
|
|
this.fromLang = lang;
|
|
|
|
}
|
2017-11-19 15:30:22 +00:00
|
|
|
|
|
|
|
public Languages getFromLang(){
|
2017-11-15 21:53:52 +00:00
|
|
|
return this.fromLang;
|
|
|
|
}
|
2017-11-19 15:30:22 +00:00
|
|
|
|
|
|
|
public void setToLang(Languages lang){
|
2017-11-15 21:53:52 +00:00
|
|
|
this.toLang = lang;
|
|
|
|
}
|
2017-11-19 15:30:22 +00:00
|
|
|
|
|
|
|
public Languages getToLang(){
|
2017-11-15 21:53:52 +00:00
|
|
|
return this.toLang;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|