All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.abc.templates.HtmlTable

java.lang.Object
   |
   +----com.abc.templates.HtmlControl
           |
           +----com.abc.templates.HtmlTable

public class HtmlTable
extends HtmlControl
implements Serializable

Object represent table. You must set filler object for table. Filler object has to implements IFillTable interface. HtmlTable has all properties as html table tag has.

Example:

<Table border="1" width="100%" name="TABLE">
<tr>
<th width="16%" nowrap>Clock#</th>
<th width="16%" nowrap>Driver Licence</th>
<th width="16%" nowrap>State</th>
<th width="16%" nowrap>Issued date</th>
<th width="16%" nowrap>Expiration date</th>
</tr>
<tr>
<td width="16%" nowrap name="Employee"></td>
<td width="16%" nowrap name="DrLicence"></td>
<td width="16%" nowrap name="State" align="center"></td>
<td width="16%" nowrap name="Issued" align="center"></td>
<td width="16%" nowrap name="Expiration" align="center"></td>
</tr>
</Table>

Please note capital T. It's because parser must distinguish between dynamic tables and static. <th> or <td> fields indicates columns for table. You can refer to columns by name or by number( starting from 0). Current version does not allow you to have more than one row for header. Because of this only two rows permitted to describe table layout, one for header and second for body(dynamic rows). You may use td tag for header but then you must use "header' property to indicate that this field belong to header( see TableField). You can cave empty table ( no body no header) and built it dynamicly(see AddFiled, AddHeader methods).


 

 o HtmlTable()
constructor.
 o HtmlTable(HtmlTable)
copy constructor.
 o AddField(TableField)
adds field object to body of the table. You can use it to built HtmlTable object dynamically.
 o AddHeader(TableField)
adds field object to header of the table. You can use it to built HtmlTable object dynamically.
 o Field(int iNum )
returns TableField with index iNum.
 o Field(String sName)
returns TableField with name == sName. That prefered method to access fields because then you will be able to change order of columns in template file.
 o getAlign()
returns "Align" property.
 o getBackground()
returns "Background" property.
 o getBgcolor()
returns "Bgcolor" property.
 o getBodyFields()
returns vector of TableField for body of the table.
 o getBorder()
returns "Border" property.
 o getBorderColor()
returns "BorderColor" property.
 o getBorderColorDark()
returns "BorderColorDark" property.
 o getBorderColorLight()
returns "BorderColorLight" property.
 o getCellPadding()
returns "CellPadding" property.
 o getCellSpacing()
returns "CellSpacing" property.
 o getFiller()
returns filler object for table
 o getHeaderFields()
returns vector of TableField for header of the table
 o getHeight()
 
 o getValue()
returns "". There is no value to return.
 o getWidth()
returns "width" property.
 o setAlign(String)
returns "align" property.
 o setBackground(String)
sets "background" property.
 o setBgcolor(String)
 
 o setBodyFields(Vector)
sets body fields for table.
 o setBorder(String)
 
 o setBorderColor(String)
 
 o setBorderColorDark(String)
 
 o setBorderColorLight(String)
 
 o setCellPadding(String)
 
 o setCellSpacing(String)
 
 o setFiller(IFillTableRow)
sets filler for table.
 o setHeaderFields(Vector)
sets header for table.
 o setHeight(String)
 
 o setValue(String)
Does nothing. There is no value to set for table.
 o setWidth(String)
 

 o HtmlTable
public HtmlTable()

 o HtmlTable
public HtmlTable(HtmlTable tmp)

 o AddField
public final void AddField(TableField field)

 o AddHeader
public final void AddHeader(TableField field)

 o Field
public final TableField Field(int iOrder)

 o Field
public final TableField Field(String sName)

 o getAlign
public final String getAlign()

 o getBackground
public final String getBackground()

 o getBgcolor
public final String getBgcolor()

 o getBodyFields
public final Vector getBodyFields()

 o getBorder
public final String getBorder()

 o getBorderColor
public final String getBorderColor()

 o getBorderColorDark
public final String getBorderColorDark()

 o getBorderColorLight
public final String getBorderColorLight()

 o getCellPadding
public final String getCellPadding()

 o getCellSpacing
public final String getCellSpacing()

 o getFiller
public final IFillTableRow getFiller()

 o getHeaderFields
public final Vector getHeaderFields()

 o getHeight
public final String getHeight()

 o getWidth
public final String getWidth() 

 o setAlign
public final void setAlign(String sAlign)

 o setBackground
public final void setBackground(String sBackground)

 o setBgcolor
public final void setBgcolor(String sBgcolor)

 o setBodyFields
public final void setBodyFields(Vector body)

 o setBorder
public final void setBorder(String sBorder)

 o setBorderColor
public final void setBorderColor(String sBorderColor)

 o setBorderColorDark
public final void setBorderColorDark(String sBorderColorDark)

 o setBorderColorLight
public final void setBorderColorLight(String sBorderColorLight)

 o setCellPadding
public final void setCellPadding(String sPadding)

 o setCellSpacing
public final void setCellSpacing(String sSpacing)

 o setFiller
public final void setFiller(IFillTableRow filler)

 o setHeaderFields
public final void setHeaderFields(Vector header)

 o setHeight
public final void setHeight(String sHeight)

 o setWidth
public final void setWidth(String sWidth)


All Packages  Class Hierarchy  This Package  Previous  Next  Index