Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package model;import model.topic.CheatTopic;import model.topic.Topic;public class FormatControll{private FormatDefinition def;private Topic topic;private CheatTopic cTopic;private Formatter format;private StringBuilder str;private boolean isTutorial;private boolean central;private final int ONCE=1;private final int TWICE=2;public FormatControll(boolean isTutorial,boolean central,Object topic,FormatDefinition def){if(isTutorial)
- this.topic=(Topic)topic;else
- this.cTopic=(CheatTopic)topic;this.def=def;this.isTutorial=isTutorial;this.central=central;}
- private String buildHeader(){String varDeveloper=!isTutorial?"Desenvolvido por: "+cTopic.getDeveloper():"";String varAuthor=!isTutorial?cTopic.getAuthor():topic.getAuthor();String varIntro=!isTutorial?cTopic.getIntro():topic.getIntro();String fmtLogo=format.setImage(def.getForumLogoUrl());String fmtTitle=format.setTextSize(def.getHighTextSize(),format.setTextColor(def.getHighTextColor(),format.setTextFont(def.getHighTextFont(),topic.getTitle().toUpperCase())));String fmtInfo=format.setFontStyle("ITALIC",format.setTextColor(def.getAuxTextColor(),format.setTextSize(def.getAuxTextSize(),varAuthor.toUpperCase())+
- format.nextLine(ONCE)+
- varDeveloper.toUpperCase()));str=new StringBuilder();return str.append(format.setHorizontalTextPosition("CENTER",format.setTextColor(def.getTextColor(),format.setTextFont(def.getTextFont(),format.setTextSize(def.getTextSize(),fmtLogo+format.nextLine(ONCE)+
- fmtTitle+format.nextLine(ONCE)+
- fmtInfo+
- separator()+
- varIntro+
- separator()))))).toString();}
- private String buildContent(){str=new StringBuilder();return str.toString();}
- private String separator(){str=new StringBuilder();return str.append(format.nextLine(TWICE)).append(format.setImage(def.getSeparator())).append(format.nextLine(TWICE)).toString();}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement