jaxcent
Class HtmlTable

java.lang.Object
  extended byjaxcent.JaxcentObject
      extended byjaxcent.JaxcentHtmlElement
          extended byjaxcent.HtmlTable

public class HtmlTable
extends JaxcentHtmlElement

The class HtmlTable corresponds to TABLE tags on the page.


Constructor Summary
HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String str)
          Search for HTML element on page by specified search type and search string.
HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String[] attributes, java.lang.String[] values)
          Create new HTML element on page using the specified attributes and values.
HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String str, int index)
          Search for HTML Element on page by specified search type and search string, and search index.
HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String tag, java.lang.String text)
          Create new HTML Element on page using the specified tag.
HtmlTable(JaxcentPage page, SearchType searchType, java.lang.String text, java.lang.String[] attributes, java.lang.String[] values)
          Create new HTML element on page using the specified text and attributes and values.
HtmlTable(JaxcentPage page, java.lang.String id)
          Search for HTML element on page by specified ID
 
Method Summary
 void deleteAllRows()
          Remove all Rows.
 void deleteFromBottom(int n)
          Remove N rows from bottom.
 void deleteFromTop(int n)
          Remove N rows from top.
 void deleteRow(int index)
          Delete the row at the specified index.
 int getBorder()
          Retrieve the "border" property
 java.lang.String getCaption()
          Retrieve the "caption" property
 int getCellPadding()
          Retrieve the "cellPadding" property
 int getCellSpacing()
          Retrieve the "cellSpacing" property
 java.lang.String getFrame()
          Retrieve the "frame" property
 int getNumRows()
          Returns the number of rows in the table.
 HtmlTableRow getRow(int index)
          Return the row at the specified index.
 java.lang.String getRules()
          Retrieve the "rules" property
 int getWidth()
          Retrieve the "width" property
 HtmlTableRow insertRow(int index, java.lang.String[] innerHTML)
          Insert a row in the table at the specified index.
 HtmlTableRow insertRow(int index, java.lang.String[] innerHTML, java.lang.String[][] attributes, java.lang.String[][] values)
          Insert a row in the table at the specified index, and set attributes of each new cell as specified.
protected  void onBlur()
          Override to handle the "blur" event
protected  void onClick()
          Override to handle the "click" event
protected  void onFocus()
          Override to handle the "focus" event
protected  void onMouseDown()
          Override to handle the "mouseDown" event
protected  void onMouseUp()
          Override to handle the "mouseUp" event
 void setBorder(int value)
          Set the "border" property
 void setCaption(java.lang.String value)
          Set the "caption" property
 void setCellPadding(int value)
          Set the "cellPadding" property
 void setCellSpacing(int value)
          Set the "cellSpacing" property
 void setFrame(java.lang.String value)
          Set the "frame" property
 void setRules(java.lang.String value)
          Set the "rules" property
 void setWidth(int value)
          Set the "width" property
 
Methods inherited from class jaxcent.JaxcentHtmlElement
getAttribute, getID, getInnerText, getStyle, getTag, hide, insertAfter, insertAtBeginning, insertAtBeginning, insertAtEnd, insertAtEnd, insertBefore, setAttribute, setInnerText, setStyle, setStyle, setStyle, setStyle, setVisible, show
 
Methods inherited from class jaxcent.JaxcentObject
addJavaScriptVerification, getId, getProperty, setId, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlTable

public HtmlTable(JaxcentPage page,
                 java.lang.String id)
Search for HTML element on page by specified ID


HtmlTable

public HtmlTable(JaxcentPage page,
                 SearchType searchType,
                 java.lang.String str)
Search for HTML element on page by specified search type and search string. If the search returns multiple objects, use the first one.


HtmlTable

public HtmlTable(JaxcentPage page,
                 SearchType searchType,
                 java.lang.String str,
                 int index)
Search for HTML Element on page by specified search type and search string, and search index. The search is expected to return multiple results. The search index is 0-based, and specifies the index in the multiple results. This constructor is not for use with createNew.


HtmlTable

public HtmlTable(JaxcentPage page,
                 SearchType searchType,
                 java.lang.String tag,
                 java.lang.String text)
          throws Jaxception
Create new HTML Element on page using the specified tag. Search type must be createNew and tag must be "TABLE". If text is non null, the new element is populated with that text.


HtmlTable

public HtmlTable(JaxcentPage page,
                 SearchType searchType,
                 java.lang.String[] attributes,
                 java.lang.String[] values)
          throws Jaxception
Create new HTML element on page using the specified attributes and values. Search type must be createNew. Attributes and values arrays must have the same length.


HtmlTable

public HtmlTable(JaxcentPage page,
                 SearchType searchType,
                 java.lang.String text,
                 java.lang.String[] attributes,
                 java.lang.String[] values)
          throws Jaxception
Create new HTML element on page using the specified text and attributes and values. Search type must be createNew. Attributes and values arrays must have the same length.

Method Detail

onClick

protected void onClick()
Override to handle the "click" event


onMouseDown

protected void onMouseDown()
Override to handle the "mouseDown" event


onMouseUp

protected void onMouseUp()
Override to handle the "mouseUp" event


onFocus

protected void onFocus()
Override to handle the "focus" event


onBlur

protected void onBlur()
Override to handle the "blur" event


getNumRows

public int getNumRows()
               throws Jaxception
Returns the number of rows in the table.

Throws:
Jaxception

getRow

public HtmlTableRow getRow(int index)
                    throws Jaxception
Return the row at the specified index.

Throws:
Jaxception

deleteRow

public void deleteRow(int index)
               throws Jaxception
Delete the row at the specified index.

Throws:
Jaxception

insertRow

public HtmlTableRow insertRow(int index,
                              java.lang.String[] innerHTML)
                       throws Jaxception
Insert a row in the table at the specified index. If index is -1, the row is inserted at the end. The HTML content of the cells of the row are provided as a string array. Note that the HTML content is "inner" HTML, so the beginning and ending TD tags must not be part of the html.

Throws:
Jaxception

insertRow

public HtmlTableRow insertRow(int index,
                              java.lang.String[] innerHTML,
                              java.lang.String[][] attributes,
                              java.lang.String[][] values)
                       throws Jaxception
Insert a row in the table at the specified index, and set attributes of each new cell as specified. The attribute and value arrays are two dimensional. Their first dimension must be the same length as the "innerHTML" array. Their second dimensions must match with each other. To set style values, specify attribute strings starting with "style.", e.g. "style.color".

Throws:
Jaxception

deleteAllRows

public void deleteAllRows()
                   throws Jaxception
Remove all Rows. Useful before inserting new rows.

Throws:
Jaxception

deleteFromTop

public void deleteFromTop(int n)
                   throws Jaxception
Remove N rows from top. If N is negative, keep -N (abs N) rows, remove rest from top.

Throws:
Jaxception

deleteFromBottom

public void deleteFromBottom(int n)
                      throws Jaxception
Remove N rows from bottom. If N is negative, keep -N (abs N) rows, remove rest from bottom.

Throws:
Jaxception

setBorder

public void setBorder(int value)
               throws Jaxception
Set the "border" property

Throws:
Jaxception

getBorder

public int getBorder()
              throws Jaxception
Retrieve the "border" property

Throws:
Jaxception

setCaption

public void setCaption(java.lang.String value)
                throws Jaxception
Set the "caption" property

Throws:
Jaxception

getCaption

public java.lang.String getCaption()
                            throws Jaxception
Retrieve the "caption" property

Throws:
Jaxception

setCellPadding

public void setCellPadding(int value)
                    throws Jaxception
Set the "cellPadding" property

Throws:
Jaxception

getCellPadding

public int getCellPadding()
                   throws Jaxception
Retrieve the "cellPadding" property

Throws:
Jaxception

setCellSpacing

public void setCellSpacing(int value)
                    throws Jaxception
Set the "cellSpacing" property

Throws:
Jaxception

getCellSpacing

public int getCellSpacing()
                   throws Jaxception
Retrieve the "cellSpacing" property

Throws:
Jaxception

setFrame

public void setFrame(java.lang.String value)
              throws Jaxception
Set the "frame" property

Throws:
Jaxception

getFrame

public java.lang.String getFrame()
                          throws Jaxception
Retrieve the "frame" property

Throws:
Jaxception

setRules

public void setRules(java.lang.String value)
              throws Jaxception
Set the "rules" property

Throws:
Jaxception

getRules

public java.lang.String getRules()
                          throws Jaxception
Retrieve the "rules" property

Throws:
Jaxception

setWidth

public void setWidth(int value)
              throws Jaxception
Set the "width" property

Throws:
Jaxception

getWidth

public int getWidth()
             throws Jaxception
Retrieve the "width" property

Throws:
Jaxception