All Packages Class Hierarchy This Package Previous Next Index
Class sics.agentbase.html.HtmlTable
java.lang.Object
|
+----sics.agentbase.html.HtmlContent
|
+----sics.agentbase.html.HtmlTable
- public class HtmlTable
- extends HtmlContent
The HtmlTable class implements a HTML table and methods to
generate HTML code representation of it.
Objects at a specified position in the table can be added, removed or
changed.
-
HtmlTable(int, int)
- Creates a HtmlTable with the specified size.
-
HtmlTable(Object[][])
- Creates a HtmlTable with the specified size and values.
-
clrElementAt(int, int)
- Removes the element at the specified position in this table.
-
getPattern(int, int)
-
-
setBorder(String)
- Sets the border of this table.
-
setCaption(String)
- Sets the caption of this table.
-
setCaption(String, String)
- Sets the caption of this table with the specified alignment.
-
setElementAt(int, int, Object)
- Sets the element at the specified position in this table.
-
setPattern(int)
- Sets the pattern type of this table.
-
setRow(int, Object[])
- Sets the row at the specified position in this table.
-
toString()
- Returns a string representation of this HTML table.
HtmlTable
public HtmlTable(int rows,
int cols)
- Creates a HtmlTable with the specified size.
- Parameters:
- rows - the number of rows in the table.
- cols - the number of columns in the table.
HtmlTable
public HtmlTable(Object o[][])
- Creates a HtmlTable with the specified size and values.
The specified array is used as a representation of the table with
the same number of rows and columns as the array.
- Parameters:
- o - a matris of values representing the table.
setBorder
public void setBorder(String border)
- Sets the border of this table.
- Parameters:
- border - the size of the border as a string or
null if no border should be used
(default).
setPattern
public void setPattern(int pat)
- Sets the pattern type of this table.
setCaption
public void setCaption(String caption)
- Sets the caption of this table.
- Parameters:
- caption - the caption of this table or
null if no
caption should be used (default).
setCaption
public void setCaption(String caption,
String align)
- Sets the caption of this table with the specified alignment.
- Parameters:
- caption - the caption of this table or
null if no
caption should be used (default).
- align - the alignment of the caption.
setElementAt
public void setElementAt(int row,
int col,
Object o)
- Sets the element at the specified position in this table.
- Parameters:
- row - the row to set the element at.
- col - the column to set the element at.
- o - the element to set in this table.
- Throws: ArrayIndexOutOfBoundsException
- if an invalid position
was given.
clrElementAt
public void clrElementAt(int row,
int col)
- Removes the element at the specified position in this table.
- Parameters:
- row - the row to remove the element at.
- col - the column to remove the element at.
- o - the element to remove from this table.
- Throws: ArrayIndexOutOfBoundsException
- if an invalid position
was given.
setRow
public void setRow(int row,
Object o[])
- Sets the row at the specified position in this table.
- Parameters:
- row - the row to set the elements.
- o - an array with elements to set at the specified row in this table.
- Throws: ArrayIndexOutOfBoundsException
- if an invalid row
was given.
toString
public String toString()
- Returns a string representation of this HTML table.
- Returns:
- a string representation of this HTML table.
- Overrides:
- toString in class HtmlContent
getPattern
public String getPattern(int y,
int x)
All Packages Class Hierarchy This Package Previous Next Index