import java.io.*;
class HtmlBody {
private String topMargin;
private String leftMargin;
private String bkGrnd;
private String bgColor;
private String text;
private String link;
private String aLink;
private String onLoad;
private String onUnload;
HtmlBody() {
}
HtmlBody(String topMargin, String leftMargin, String bkGrnd, String bgColor, String text, String link, String aLink, String onLoad, String onUnload) {
this.topMargin = topMargin;
this.leftMargin= leftMargin;
this.bkGrnd = bkGrnd;
this.bgColor= bgColor;
this.text = text;
this.link = link;
this.aLink = aLink;
this.onLoad = onLoad;
this.onUnload = onUnload;
}
protected StringBuffer doBodyTag(StringBuffer sb) {
String bodyTag = "<BODY";
if (topMargin != null) {
bodyTag += " TOPMARGIN='"+topMargin+"'";
}
if (leftMargin != null) {
bodyTag += " LEFTMARGIN='"+leftMargin+"'";
}
if (bkGrnd != null) {
bodyTag += " BACKGROUND='"+bkGrnd+"'";
}
if (bgColor != null) {
bodyTag += " BgColor='"+bgColor+"'";
}
if (text != null) {
bodyTag += " TEXT='"+text+"'";
}
if (link != null) {
bodyTag += " LINK='"+link+"'";
}
if (aLink != null) {
bodyTag += " ALINK='"+aLink+"'";
}
if (onLoad != null) {
bodyTag += " onLoad='"+onLoad+"'";
}
if (onUnload != null) {
bodyTag += " onUnload='"+onUnload+"'";
}
bodyTag += ">";
sb.append(bodyTag);
return sb;
}
protected Stringbuffer endBodyTag(StringBuffer sb) {
sb.append("</BODY>);
return sb;
}
};