Class java.servlet.html.HtmlRow
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.servlet.html.HtmlRow

java.lang.Object
   |
   +----java.servlet.html.HtmlRow

public class HtmlRow
extends Object
implements HtmlElement
Class for maintaining row elements in an HtmlTable.

Constructor Index

 o HtmlRow()
 o HtmlRow(String)

Method Index

 o addData(HtmlElement)
 o addData(HtmlElement, String)
 o addData(String)
 o addData(String, String)
 o addDataElements(String)
 o addDataElements(String, String)
 o addDataElements(Vector)
 o addDataElements(Vector, String)
 o addHeader(HtmlElement)
 o addHeader(HtmlElement, String)
 o addHeader(String)
 o addHeader(String, String)
 o addHeaders(String)
Add headers to row.
 o addHeaders(String, String)
Add list of headers to the current row, with specified attributes.
 o addHeaders(Vector)
 o addHeaders(Vector, String)
 o concat(HtmlRow)
 o toString()
 o wrap(String)
 o write(OutputStream)

Constructors

 o HtmlRow
  public HtmlRow()
 o HtmlRow
  public HtmlRow(String attribs)
Parameters:
attribs - the attributes embed in this <td>tag. ie. HtmlRow row = new HtmlRow("align=center"); will produce this html when written out. <td align=center></td>

Methods

 o addHeaders
  public void addHeaders(String headers,
                         String attribs)
Add list of headers to the current row, with specified attributes.
Parameters:
headers - Comma delimited String of headers to add to this row.
attribs - The attributes to embed in the <th> tag. ie. * HtmlRow row = new HtmlRow("align=center"); row.addHeaders("Male,Female", "colspan=2 rowspan=2"); will produce this html when written out <td align=center> <th colspan=2 rowspan=2>Male</th> <th colspan=2 rowspan=2>Female</th> </td>
 o addHeaders
  public void addHeaders(String headers)
Add headers to row.
Parameters:
headers - Comma delimited list of headers to add.
 o addDataElements
  public void addDataElements(String cells,
                              String attribs)
Parameters:
headers - comma delimmitted String of headers to add to this row.
attribs - the attributes to embed in the <td> tag.
 o addDataElements
  public void addDataElements(String cells)
 o addHeaders
  public void addHeaders(Vector headers,
                         String attribs)
Parameters:
headers - Vector of headers to add to this row. elements in the headers Vector must either be HtmlElements or Strings.
attribs - the attributes to embed in the <th> tag.
 o addHeaders
  public void addHeaders(Vector headers)
 o addDataElements
  public void addDataElements(Vector cells,
                              String attribs)
Parameters:
headers - Vector of headers to add to this row. elements in the headers Vector must either be HtmlElements or Strings.
attribs - the attributes to embed in the <td> tag.
 o addDataElements
  public void addDataElements(Vector cells)
 o addHeader
  public void addHeader(String header)
Parameters:
header - the content of the header to add to this row.
 o addHeader
  public void addHeader(String cell,
                        String attribs)
Parameters:
header - the content of the header to add to this row.
attribs - the attributes to associate with this header.
ie. addHeader("text", "align=bottom") produces
text
 o addHeader
  public void addHeader(HtmlElement cell)
Parameters:
header - the content of the header to add to this row.
 o addHeader
  public void addHeader(HtmlElement cell,
                        String attribs)
Parameters:
header - the content of the header to add to this row.
attribs - the attributes to associate with this header.
ie. addHeader(new HtmlText("text"), "align=bottom") produces
text
 o addData
  public void addData(String cell)
Parameters:
cell - the content of the data element to add to this row.
 o addData
  public void addData(String cell,
                      String attribs)
Parameters:
cell - the content of the data element to add to this row.
attribs - the attributes to associate with this header.
ie. addData("text", "align=bottom") produces
text
 o addData
  public void addData(HtmlElement cell)
Parameters:
cell - the content of the data element to add to this row.
 o addData
  public void addData(HtmlElement cell,
                      String attribs)
Parameters:
cell - the content of the data element to add to this row.
attribs - the attributes to associate with this data element.
ie. addData(new HtmlText("text"), "align=bottom") produces
text
 o concat
  public void concat(HtmlRow row)
Parameters:
row - Row to append to the end of this row assumes the attributes of this row. ie. HtmlRow row1 = new HtmlRow(); row1.addData("row1 data"); HtmlRow row2 = new HtmlRow("align=top"); row2.addData("row2 data"); row1.concat(row2)
generates: <tr><td>row1 data</td><td>row2 data</td><tr>
 o wrap
  public void wrap(String tags)
 o write
  public void write(OutputStream out) throws IOException
 o toString
  public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index