Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // são somente umas configurações que variam de acordo com o estilo escolhido na UI
- // depende do ' tema ' que o cara escolher. rlx ja ta funcionando
- // * ta com um separador criado pela biafoox, ela deixou usar ITSSSSSSSSSS FREEE uahuahuahuah
- // upa no git depois
- package formatter.model;public class EditConfig{private final int MAIN_FONT_SIZE=5,FONT_SIZE=2;private final String defaultSeparator="[IMG]http://i.imgur.com/Js7mU3w.png[/IMG]";private String style,mainColor,color;private String mainFontName,fontName;private String mainFontColor,fontColor;private String userSeparator;private String downloadImage,scanImage;public EditConfig(){}
- public EditConfig(String style,String mainColor,String color){this.style=style;this.mainColor=mainColor;this.color=color;apply();}
- private void apply(){setStyle();setMainColor();setColor();}
- private void setStyle(){switch(this.style){case"basic":mainFontName="Impact";fontName="Arial Narrow";break;case"minimal":mainFontName="Century Gothic";fontName="Franklin Gothic Book";break;case"flat":mainFontName="Century Gothic";fontName="Century Gothic";break;case"stylish":mainFontName="Impact";fontName="Cambria";break;}}
- private void setMainColor(){switch(this.mainColor){case"red":if(this.style.equals("minimal")||(this.style.equals("flat")))
- mainFontColor="#D92D2D";else mainFontColor="#FF0000";break;case"green":if(this.style.equals("minimal")||(this.style.equals("flat")))
- mainFontColor="#5ECA6B";else mainFontColor="#00B300";break;case"blue":if(this.style.equals("minimal")||(this.style.equals("flat")))
- mainFontColor="#1395C6";else mainFontColor="#0000DD";break;default:mainFontColor="#000000";break;}}
- private void setColor(){switch(this.color){case"dark":fontColor="#3C3C3C";break;case"light":fontColor="#9B9B9B";break;default:fontColor="#000000";break;}}
- public String getSeparator(){if(this.userSeparator==null||this.userSeparator.isEmpty())
- return defaultSeparator;return userSeparator;}
- public void setSeparator(String s){userSeparator=s;}
- public int getMAIN_FONT_SIZE(){return MAIN_FONT_SIZE;}
- public int getFONT_SIZE(){return FONT_SIZE;}
- public String getMainFontName(){return mainFontName;}
- public String getFontName(){return fontName;}
- public String getMainFontColor(){return mainFontColor;}
- public String getFontColor(){return fontColor;}
- public String getUserSeparator(){return userSeparator;}
- public String getDownloadImage(){return this.downloadImage;}
- public void setDownloadImage(String downloadImage){this.downloadImage=downloadImage;}
- public String getScanImage(){return scanImage;}
- public void setScanImage(String scanImage){this.scanImage=scanImage;}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement