import java.util.List;\r
\r
public class Imports implements Thematic{\r
- List<String> css,js;\r
- public final int backdots;\r
-// public final File webDir;\r
- private String theme;\r
- \r
- public Imports(int backdots) {\r
-// this.webDir = webDir;\r
- \r
- css = new ArrayList<String>();\r
- js = new ArrayList<String>();\r
- this.backdots = backdots;\r
- theme = "";\r
- }\r
- \r
- public Imports css(String str) {\r
- css.add(str);\r
- return this;\r
- }\r
- \r
- public Imports js(String str) {\r
- js.add(str);\r
- return this;\r
- }\r
+ List<String> css;\r
+ List<String> js;\r
+ public final int backdots;\r
+ private String theme;\r
+ \r
+ public Imports(int backdots) {\r
+ \r
+ css = new ArrayList<>();\r
+ js = new ArrayList<>();\r
+ this.backdots = backdots;\r
+ theme = "";\r
+ }\r
+ \r
+ public Imports css(String str) {\r
+ css.add(str);\r
+ return this;\r
+ }\r
+ \r
+ public Imports js(String str) {\r
+ js.add(str);\r
+ return this;\r
+ }\r
\r
- public Imports theme(String str) {\r
- theme = str==null?"":str;\r
- return this;\r
- }\r
+ public Imports theme(String str) {\r
+ theme = str==null?"":str;\r
+ return this;\r
+ }\r
\r
- /**\r
- * Pass in a possible Theme. If it is "" or null, it will resolve to default Theme set in Imports\r
- * \r
- * @param theTheme\r
- * @return\r
- */\r
- @Override\r
- public String themePath(String theTheme) {\r
- StringBuilder src = dots(new StringBuilder());\r
- if(theTheme==null||theTheme.length()==0) {\r
- src.append(theme);\r
- if(theme.length()>0)src.append('/');\r
- } else {\r
- src.append(theTheme);\r
- src.append('/');\r
- }\r
+ /**\r
+ * Pass in a possible Theme. If it is "" or null, it will resolve to default Theme set in Imports\r
+ * \r
+ * @param theTheme\r
+ * @return\r
+ */\r
+ @Override\r
+ public String themePath(String theTheme) {\r
+ StringBuilder src = dots(new StringBuilder());\r
+ if (theTheme==null||theTheme.length()==0) {\r
+ src.append(theme);\r
+ if (theme.length()>0)src.append('/');\r
+ } else {\r
+ src.append(theTheme);\r
+ src.append('/');\r
+ }\r
\r
- return src.toString();\r
- }\r
- \r
- /**\r
- * Pass in a possible Theme. If it is "" or null, it will resolve to default Theme set in Imports\r
- * \r
- * @param theTheme\r
- * @return\r
- */\r
- @Override\r
- public String themeResolve(String theTheme) {\r
- return (theTheme==null||theTheme.length()==0)\r
- ?theme\r
- :theTheme;\r
- }\r
+ return src.toString();\r
+ }\r
+ \r
+ /**\r
+ * Pass in a possible Theme. If it is "" or null, it will resolve to default Theme set in Imports\r
+ * \r
+ * @param theTheme\r
+ * @return\r
+ */\r
+ @Override\r
+ public String themeResolve(String theTheme) {\r
+ return (theTheme==null||theTheme.length()==0)\r
+ ?theme\r
+ :theTheme;\r
+ }\r
\r
- public StringBuilder dots(StringBuilder src) {\r
- for(int i=0;i<backdots;++i) {\r
- src.append("../");\r
- }\r
- return src;\r
- }\r
- \r
+ public StringBuilder dots(StringBuilder src) {\r
+ for (int i=0;i<backdots;++i) {\r
+ src.append("../");\r
+ }\r
+ return src;\r
+ }\r
+ \r
};\r
\r