class HtmlTop implements HtmlStrings {
private String styleSheet;
private String scriptName;
private String title;
private String metaHttpEquiv;
private String metaDescription;
private String metaKeyWords;
private String tags;
HtmlTop() {
}
HtmlTop(String title, String scriptName, String styleSheet, String metaHttpEquiv, String metaDescription, String metaKeyWords) {
this.title = title;
if (scriptName != null) {
this.scriptName = scriptName;
}
if (styleSheet != null) {
this.styleSheet = styleSheet;
}
if (metaHttpEquiv != null) {
this.metaHttpEquiv = metaHttpEquiv;
}
if (metaDescription != null) {
this.metaDescription = metaDescription;
}
if (metaKeyWords != null) {
this.metaKeyWords = metaKeyWords;
}
}
protected String doHtmlTop() {
tags += "<HTML><HEAD><TITLE>"+title+"</TITLE>";
if (styleSheet != null) {
tags += "<LINK REL='Stylesheet' TYPE='text/css' HREF='"+styleSheet+"'>";
}
if (metaHttpEquiv != null) {
tags += "<META HTTP-EQUIV=Refresh CONTENT="+metaHttpEquiv+">";
}
if (metaDescription != null) {
tags += "<META NAME='Description' CONTENT='"+metaDescription+"'>";
}
if (metaKeyWords != null) {
tags += "<META NAME='Keywords' CONTENT='"+metaKeyWords+">";
}
if (scriptName != null) {
tags += "<SCRIPT LANGUAGE='JavaScript' TYPE='text/javascript' SRC='"+scriptName+"'></SCRIPT>";
}
tags += "</HEAD>";
return tags;
}
protected String endHtml() {
return "</BODY></HTML>";
}
};