/** {@inheritDoc} */
@Override
- public String getHtml() {
+ public String getHtml(final boolean showTitle,
+ final boolean doHtmlHeaderAndFooter) {
// assemble final page HTML
final StringBuffer finalHtml = new StringBuffer();
- // page header
- finalHtml.append("<HTML>\n");
- finalHtml.append("<HEAD>\n");
- finalHtml
- .append(" <meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\"/>\n");
- finalHtml.append("</HEAD>\n");
- finalHtml
- .append("<BODY bgcolor=\"#000000\" alink=\"#50ffff\" link=\"#50ffff\" vlink=\"#ff50ff\" text=\"#ffffff\">\n");
- finalHtml.append("<!-- " + Constants.HTML_MAGIC_STRING + " -->\n");
- finalHtml.append("<!-- " + Constants.HTML_MEMO + " -->\n");
- finalHtml.append("<FONT color=\"#ffffff\">\n");
- finalHtml.append("<CENTER><H1>" + galleryTitle + "</H1>\n");
-
- finalHtml.append("<H2>");
+ if (doHtmlHeaderAndFooter) {
+ // page header
+ finalHtml.append("<HTML>\n");
+ finalHtml.append("<HEAD>\n");
+ finalHtml
+ .append(" <meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\"/>\n");
+ finalHtml.append("</HEAD>\n");
+ finalHtml
+ .append("<BODY bgcolor=\"#000000\" alink=\"#50ffff\" link=\"#50ffff\" vlink=\"#ff50ff\" text=\"#ffffff\">\n");
+ finalHtml.append("<!-- " + Constants.HTML_MAGIC_STRING + " -->\n");
+ finalHtml.append("<!-- " + Constants.HTML_MEMO + " -->\n");
+ finalHtml.append("<font color=\"#ffffff\">\n");
+ }
+
+ if (showTitle)
+ finalHtml
+ .append("<CENTER><H1>" + galleryTitle + "</H1></CENTER>\n");
+
+ finalHtml.append("<CENTER><H2>");
for (final String p : path)
finalHtml.append(" / " + p);
finalHtml.append("</H2></CENTER>\n");
finalHtml.append(filesHtml.toString());
finalHtml.append("\n</TABLE>\n");
- finalHtml.append("</font></BODY></HTML>\n");
+ if (doHtmlHeaderAndFooter)
+ finalHtml.append("</font></BODY></HTML>\n");
return finalHtml.toString();
}