class HtmlTable {
private String align;
private String backGround;
private String bgColor;
private int border;
private String borderColor;
private int cellPadding;
private int cellSpacing;
private String classVar;
private String width;
HtmlTable() {
}
HtmlTable(String align, String backGround, String bgColor, int border, String borderColor, int cellPadding, int cellSpacing, String classVar, String width) {
this.align = align;
this.backGround = backGround;
this.bgColor = bgColor;
this.border = border;
this.borderColor = borderColor;
this.cellPadding = cellPadding;
this.cellSpacing = cellSpacing;
this.classVar = classVar;
this.width = width;
}
protected String doTableTag() {
String tableTag = "<TABLE";
if (align != null) {
tableTag += " ALIGN='"+align+"'";
}
if (backGround != null) {
tableTag += " BACKGROUND='"+backGround+"'";
}
if (bgColor != null) {
tableTag += " BGCOLOR='"+bgColor+"'";
}
tableTag += " BORDER='"+border+"'";
if (borderColor != null) {
tableTag += " BORDERCOLOR='"+borderColor+"'";
}
tableTag += " CELLPADDING='"+cellPadding+"'";
tableTag += " CELLSPACING='"+cellSpacing+"'";
if (classVar != null) {
tableTag += " CLASS='"+classVar+"'";
}
if (width != null) {
tableTag += " WIDTH='"+width+"'";
}
return tableTag += ">";
}
protected String endTableTag() {
return "</TABLE>";
}
};