com.gargoylesoftware.htmlunit.html
Class HtmlTable

java.lang.Object
  extended by com.gargoylesoftware.htmlunit.html.DomNode
      extended by com.gargoylesoftware.htmlunit.html.DomNamespaceNode
          extended by com.gargoylesoftware.htmlunit.html.HtmlElement
              extended by com.gargoylesoftware.htmlunit.html.StyledElement
                  extended by com.gargoylesoftware.htmlunit.html.ClickableElement
                      extended by com.gargoylesoftware.htmlunit.html.HtmlTable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class HtmlTable
extends ClickableElement

Wrapper for the HTML element "table".

Version:
$Revision: 1.3 $
Author:
Mike Bowler, David K. Taylor, Christian Sell, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
HtmlElement.MapEntryWrappingIterator
 
Field Summary
static java.lang.String TAG_NAME
 the HTML tag represented by this element
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
ATTRIBUTE_NOT_DEFINED, ATTRIBUTE_VALUE_EMPTY
 
Fields inherited from class com.gargoylesoftware.htmlunit.html.DomNode
PROPERTY_ELEMENT, READY_STATE_COMPLETE, READY_STATE_INTERACTIVE, READY_STATE_LOADED, READY_STATE_LOADING, READY_STATE_UNINITIALIZED
 
Method Summary
 java.lang.String getAlignAttribute()
 Return the value of the attribute "align".
 java.lang.String getBgcolorAttribute()
 Return the value of the attribute "bgcolor".
 java.util.List getBodies()
 Return a list of tables bodies defined in this table.
 java.lang.String getBorderAttribute()
 Return the value of the attribute "border".
 java.lang.String getCaptionText()
 Return the table caption text or an empty string if a caption wasn't specified
 HtmlTableCell getCellAt(int rowIndex, int columnIndex)
 Return the first cell that matches the specified row and column, searching left to right, top to bottom.
 java.lang.String getCellPaddingAttribute()
 Return the value of the attribute "cellpadding".
 java.lang.String getCellSpacingAttribute()
 Return the value of the attribute "cellspacing".
 HtmlTableFooter getFooter()
 Return the table footer or null if a footer wasn't specified
 java.lang.String getFrameAttribute()
 Return the value of the attribute "frame".
 HtmlTableHeader getHeader()
 Return the table header or null if a header wasn't specified
 HtmlTableRow getRow(int index)
  
 HtmlTableRow getRowById(java.lang.String id)
 Find and return the row with the specified id.
 int getRowCount()
 compute the number of rows in this table.
 java.util.List getRows()
  
 java.lang.String getRulesAttribute()
 Return the value of the attribute "rules".
 java.lang.String getSummaryAttribute()
 Return the value of the attribute "summary".
 java.lang.String getWidthAttribute()
 Return the value of the attribute "width".
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.ClickableElement
click, click, dblClick, dblClick, getLangAttribute, getOnClickAttribute, getOnDblClickAttribute, getOnKeyDownAttribute, getOnKeyPressAttribute, getOnKeyUpAttribute, getOnMouseDownAttribute, getOnMouseMoveAttribute, getOnMouseOutAttribute, getOnMouseOverAttribute, getOnMouseUpAttribute, getTextDirectionAttribute, getXmlLangAttribute
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.StyledElement
getClassAttribute, getIdAttribute, getStyleAttribute, getTitleAttribute
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.HtmlElement
addHtmlAttributeChangeListener, appendChildIfNoneExists, cloneDomNode, fireEvent, fireEvent, getAttributeEntriesIterator, getAttributeValue, getChildElementsIterator, getEnclosingElement, getEnclosingForm, getEnclosingFormOrDie, getEventHandler, getHtmlElementById, getHtmlElementsByAttribute, getHtmlElementsByTagName, getHtmlElementsByTagNames, getId, getNodeName, getNodeType, getOneHtmlElementByAttribute, getTagName, hasHtmlElementWithId, isAttributeDefined, keyDown, keyDown, mouseDown, mouseDown, mouseMove, mouseMove, mouseOut, mouseOut, mouseOver, mouseOver, mouseUp, mouseUp, removeAttribute, removeChild, removeEventHandler, removeHtmlAttributeChangeListener, rightClick, rightClick, setAttributeValue, setEventHandler, setEventHandler, setId, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNamespaceNode
getLocalName, getNamespaceURI, getPrefix, getQualifiedName, setPrefix
 
Methods inherited from class com.gargoylesoftware.htmlunit.html.DomNode
addDomChangeListener, appendDomChild, asText, asXml, getAllHtmlChildElements, getByXPath, getChildIterator, getEndColumnNumber, getEndLineNumber, getFirstDomChild, getLastDomChild, getNextDomSibling, getNodeValue, getPage, getParentDomNode, getPreviousDomSibling, getReadyState, getScriptObject, getStartColumnNumber, getStartLineNumber, insertBefore, remove, removeAllChildren, removeDomChangeListener, replace, setNodeValue, setReadyState, setScriptObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
the HTML tag represented by this element

See Also:
Constant Field Values
Method Detail

getAlignAttribute

public final java.lang.String getAlignAttribute()
Return the value of the attribute "align". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "align" or an empty string if that attribute isn't defined.

getBgcolorAttribute

public final java.lang.String getBgcolorAttribute()
Return the value of the attribute "bgcolor". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "bgcolor" or an empty string if that attribute isn't defined.

getBodies

public java.util.List getBodies()
Return a list of tables bodies defined in this table. If no bodies were defined then an empty list will be returned.

Returns:
A list of HtmlTableBody objects.

getBorderAttribute

public final java.lang.String getBorderAttribute()
Return the value of the attribute "border". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "border" or an empty string if that attribute isn't defined.

getCaptionText

public java.lang.String getCaptionText()
Return the table caption text or an empty string if a caption wasn't specified

Returns:
The caption text

getCellAt

public final HtmlTableCell getCellAt(int rowIndex,
                                     int columnIndex)
Return the first cell that matches the specified row and column, searching left to right, top to bottom.

Parameters:
rowIndex - The row index
columnIndex - The column index
Returns:
The HtmlTableCell at that location or null if there are no cells at that location

getCellPaddingAttribute

public final java.lang.String getCellPaddingAttribute()
Return the value of the attribute "cellpadding". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "cellpadding" or an empty string if that attribute isn't defined.

getCellSpacingAttribute

public final java.lang.String getCellSpacingAttribute()
Return the value of the attribute "cellspacing". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "cellspacing" or an empty string if that attribute isn't defined.

getFooter

public HtmlTableFooter getFooter()
Return the table footer or null if a footer wasn't specified

Returns:
The table footer

getFrameAttribute

public final java.lang.String getFrameAttribute()
Return the value of the attribute "frame". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "frame" or an empty string if that attribute isn't defined.

getHeader

public HtmlTableHeader getHeader()
Return the table header or null if a header wasn't specified

Returns:
The table header

getRow

public HtmlTableRow getRow(int index)
                    throws java.lang.IndexOutOfBoundsException
Parameters:
index - the 0-based index of the row
Returns:
the HtmlTableRow at the given index
Throws:
java.lang.IndexOutOfBoundsException - if there is no row at the given index
See Also:
getRowIterator()

getRowById

public final HtmlTableRow getRowById(java.lang.String id)
                              throws ElementNotFoundException
Find and return the row with the specified id.

Parameters:
id - The id of the row
Returns:
The row with the specified id.
Throws:
ElementNotFoundException - If the row cannot be found.

getRowCount

public final int getRowCount()
compute the number of rows in this table. Note that the count is computed dynamically by iterating over all rows

Returns:
The number of rows in this table

getRows

public java.util.List getRows()
Returns:
an immutable list containing all the HtmlTableRow objects
See Also:
getRowIterator()

getRulesAttribute

public final java.lang.String getRulesAttribute()
Return the value of the attribute "rules". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "rules" or an empty string if that attribute isn't defined.

getSummaryAttribute

public final java.lang.String getSummaryAttribute()
Return the value of the attribute "summary". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "summary" or an empty string if that attribute isn't defined.

getWidthAttribute

public final java.lang.String getWidthAttribute()
Return the value of the attribute "width". Refer to the HTML 4.01 documentation for details on the use of this attribute.

Returns:
The value of the attribute "width" or an empty string if that attribute isn't defined.


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.