jaxcent
Class HtmlTableRow

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

public class HtmlTableRow
extends JaxcentHtmlElement

The class HtmlTableRow corresponds to TR tags on the page, i.e. to rows of tables. Objects of this class can also be obtained by calling the getRow method of HtmlTable objects. To add rows to a table on the page, call the insertRow, insertRowText or insertRowHtml methods of HtmlTable.


Constructor Summary
HtmlTableRow(JaxcentPage page, SearchType searchType, java.lang.String str)
          Search for HTML element on page by specified search type and search string.
HtmlTableRow(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.
HtmlTableRow(JaxcentPage page, java.lang.String id)
          Search for HTML element on page by specified ID
 
Method Summary
 void blur()
          Lose the input focus.
 void delete()
          Delete this element.
 void deleteAllCells()
          Remove all cells.
 void deleteCell(int index)
          Delete the cell at the specified index.
 void focus()
          Get the input focus.
 HtmlTableCell getCell(int index)
          Return the cell at the specified index.
 java.lang.String getInnerHTML()
          Retrieve the "innerHTML" property
 int getNumCells()
          Returns the number of cells in the row.
 int getRowIndex()
          Retrieve the "rowIndex" property
 java.lang.String getVAlign()
          Retrieve the "vAlign" property
 HtmlTableCell insertCell(int index, java.lang.String innerHTML)
          Insert a cell in the table at the specified index.
 HtmlTableCell insertCell(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 the 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 scrollIntoView(boolean top)
          Bring the element into view, by scrolling if necessary.
 void setInnerHTML(java.lang.String value)
          Set the "innerHTML" property
 void setRowIndex(int value)
          Set the "rowIndex" property
 void setVAlign(java.lang.String value)
          Set the "vAlign" 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

HtmlTableRow

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


HtmlTableRow

public HtmlTableRow(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.


HtmlTableRow

public HtmlTableRow(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.

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


getNumCells

public int getNumCells()
                throws Jaxception
Returns the number of cells in the row.

Throws:
Jaxception

getCell

public HtmlTableCell getCell(int index)
                      throws Jaxception
Return the cell at the specified index.

Throws:
Jaxception

deleteCell

public void deleteCell(int index)
                throws Jaxception
Delete the cell at the specified index.

Throws:
Jaxception

insertCell

public HtmlTableCell insertCell(int index,
                                java.lang.String innerHTML)
                         throws Jaxception
Insert a cell in the table at the specified index. If index is -1, the row is inserted at the end. The HTML content of the cell is provided as a string (not containing the TD tags.)

Throws:
Jaxception

insertCell

public HtmlTableCell insertCell(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 the new cell as specified. To set style values, specify attribute strings starting with "style.", e.g. "style.color".

Throws:
Jaxception

deleteAllCells

public void deleteAllCells()
                    throws Jaxception
Remove all cells. Useful before inserting new cells.

Throws:
Jaxception

setInnerHTML

public void setInnerHTML(java.lang.String value)
                  throws Jaxception
Set the "innerHTML" property

Throws:
Jaxception

getInnerHTML

public java.lang.String getInnerHTML()
                              throws Jaxception
Retrieve the "innerHTML" property

Throws:
Jaxception

setRowIndex

public void setRowIndex(int value)
                 throws Jaxception
Set the "rowIndex" property

Throws:
Jaxception

getRowIndex

public int getRowIndex()
                throws Jaxception
Retrieve the "rowIndex" property

Throws:
Jaxception

setVAlign

public void setVAlign(java.lang.String value)
               throws Jaxception
Set the "vAlign" property

Throws:
Jaxception

getVAlign

public java.lang.String getVAlign()
                           throws Jaxception
Retrieve the "vAlign" property

Throws:
Jaxception

scrollIntoView

public void scrollIntoView(boolean top)
                    throws Jaxception
Bring the element into view, by scrolling if necessary. If top is true, the top of element is brought into view, otherwise the bottom of the element is scrolled into view.

Throws:
Jaxception

blur

public void blur()
          throws Jaxception
Lose the input focus.

Throws:
Jaxception

focus

public void focus()
           throws Jaxception
Get the input focus.

Throws:
Jaxception

delete

public void delete()
            throws Jaxception
Delete this element.

Throws:
Jaxception