com.gargoylesoftware.htmlunit.javascript.host.html
Class HTMLTableElement

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.Node
              extended by com.gargoylesoftware.htmlunit.javascript.host.EventNode
                  extended by com.gargoylesoftware.htmlunit.javascript.host.Element
                      extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
                          extended by com.gargoylesoftware.htmlunit.javascript.host.RowContainer
                              extended by com.gargoylesoftware.htmlunit.javascript.host.html.HTMLTableElement
All Implemented Interfaces:
ScriptableWithFallbackGetter, Serializable, Cloneable, Map, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class HTMLTableElement
extends RowContainer

A JavaScript object representing a Table.

Version:
$Revision: 5864 $
Author:
David D. Kilzer, Mike Bowler, Daniel Gredler, Chris Erskine, Marc Guillemot, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
HTMLElement.ProxyDomNode
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
BEHAVIOR_ID_CLIENT_CAPS, BEHAVIOR_ID_DOWNLOAD, BEHAVIOR_ID_HOMEPAGE
 
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
HTMLTableElement()
          Creates an instance.
 
Method Summary
protected  String getXPathRows()
          Returns the XPath expression, relative to this node, enabling the retrieval of this container's rows.
 Object insertRow(int index)
          Handle special case where table is empty.
 Object jsxFunction_createCaption()
          If this table does not have a caption, this method creates an empty table caption, adds it to the table and then returns it.
 Object jsxFunction_createTFoot()
          If this table does not have a tfoot element, this method creates an empty tfoot element, adds it to the table and then returns it.
 Object jsxFunction_createTHead()
          If this table does not have a thead element, this method creates an empty thead element, adds it to the table and then returns it.
 void jsxFunction_deleteCaption()
          Deletes this table's caption.
 void jsxFunction_deleteTFoot()
          Deletes this table's tfoot element.
 void jsxFunction_deleteTHead()
          Deletes this table's thead element.
 void jsxFunction_refresh()
          Refreshes the content of this table.
 String jsxGet_bgColor()
          Returns the value of the bgColor attribute.
 String jsxGet_border()
          Gets the border attribute.
 Object jsxGet_caption()
          Returns the table's caption element, or null if none exists.
 String jsxGet_cellPadding()
          Returns the cellPadding attribute.
 String jsxGet_cellSpacing()
          Returns the cellSpacing attribute.
 Object jsxGet_tBodies()
          Returns the tbody's in the table.
 Object jsxGet_tFoot()
          Returns the table's tfoot element, or null if none exists.
 Object jsxGet_tHead()
          Returns the table's thead element, or null if none exists.
 String jsxGet_width()
          Returns the width attribute.
 void jsxSet_bgColor(String bgColor)
          Sets the value of the bgColor attribute.
 void jsxSet_border(String border)
          Sets the border attribute.
 void jsxSet_caption(Object o)
          Sets the caption.
 void jsxSet_cellPadding(String cellPadding)
          Sets the cellPadding attribute.
 void jsxSet_cellSpacing(String cellSpacing)
          Sets the cellSpacing attribute.
 void jsxSet_tFoot(Object o)
          Sets the tFoot.
 void jsxSet_tHead(Object o)
          Sets the tHead.
 void jsxSet_width(String width)
          Sets the width attribute.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.RowContainer
jsxFunction_deleteRow, jsxFunction_insertRow, jsxFunction_moveRow, jsxGet_align, jsxGet_rows, jsxSet_align
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement
addComponentRequest, clearComponentRequest, compareVersions, createEventHandler, doComponentRequest, fixAttributeName, getAlign, getAvailHeight, getAvailWidth, getBoxObject, getBufferDepth, getCh, getChOff, getColorDepth, getComponentVersion, getConnectionType, getCookieEnabled, getCpuClass, getDomNodeOrDie, getDomNodeOrNull, getHeight, getJavaEnabled, getParentHTMLElement, getPlatform, getPosX, getPosY, getSystemLanguage, getUserLanguage, getVAlign, getWidth, getWidthOrHeight, getWithFallback, isAncestorOfEventTarget, isAttributeName, isComponentInstalled, isHomePage, jsxFunction_addBehavior, jsxFunction_blur, jsxFunction_clearAttributes, jsxFunction_click, jsxFunction_contains, jsxFunction_createTextRange, jsxFunction_dispatchEvent, jsxFunction_doScroll, jsxFunction_focus, jsxFunction_getAttributeNode, jsxFunction_getAttributeNodeNS, jsxFunction_getAttributeNS, jsxFunction_getBoundingClientRect, jsxFunction_getClientRects, jsxFunction_getElementsByClassName, jsxFunction_getElementsByTagName, jsxFunction_hasAttributeNS, jsxFunction_insertAdjacentElement, jsxFunction_insertAdjacentHTML, jsxFunction_mergeAttributes, jsxFunction_removeAttributeNode, jsxFunction_removeAttributeNS, jsxFunction_removeBehavior, jsxFunction_removeExpression, jsxFunction_removeNode, jsxFunction_scrollIntoView, jsxFunction_setActive, jsxFunction_setAttribute, jsxFunction_setAttributeNode, jsxFunction_setAttributeNS, jsxFunction_setExpression, jsxGet_accessKey, jsxGet_all, jsxGet_children, jsxGet_className, jsxGet_clientHeight, jsxGet_clientLeft, jsxGet_clientTop, jsxGet_clientWidth, jsxGet_currentStyle, jsxGet_dir, jsxGet_disabled, jsxGet_document, jsxGet_filters, jsxGet_id, jsxGet_innerHTML, jsxGet_innerText, jsxGet_lang, jsxGet_language, jsxGet_localName, jsxGet_namespaceURI, jsxGet_nodeName, jsxGet_offsetHeight, jsxGet_offsetLeft, jsxGet_offsetParent, jsxGet_offsetTop, jsxGet_offsetWidth, jsxGet_outerHTML, jsxGet_parentElement, jsxGet_prefix, jsxGet_runtimeStyle, jsxGet_scopeName, jsxGet_scrollHeight, jsxGet_scrollLeft, jsxGet_scrollTop, jsxGet_scrollWidth, jsxGet_spellcheck, jsxGet_style, jsxGet_tabIndex, jsxGet_tagUrn, jsxGet_title, jsxGet_uniqueID, jsxSet_accessKey, jsxSet_className, jsxSet_dir, jsxSet_disabled, jsxSet_id, jsxSet_innerHTML, jsxSet_innerText, jsxSet_lang, jsxSet_language, jsxSet_outerHTML, jsxSet_scrollLeft, jsxSet_scrollTop, jsxSet_spellcheck, jsxSet_tabIndex, jsxSet_tagUrn, jsxSet_textContent, jsxSet_title, navigateHomePage, parseHtmlSnippet, readAttributes, setAlign, setCh, setChOff, setColorAttribute, setDefaults, setDomNode, setHomePage, setVAlign, setWidthOrHeight, startDownload, toString
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Element
createAttributesObject, jsxFunction_getAttribute, jsxFunction_getElementsByTagNameNS, jsxFunction_hasAttribute, jsxFunction_removeAttribute, jsxFunction_selectNodes, jsxFunction_selectSingleNode, jsxGet_attributes, jsxGet_tagName, jsxGet_text
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.EventNode
jsxFunction_fireEvent, jsxGet_onblur, jsxGet_onclick, jsxGet_oncontextmenu, jsxGet_ondblclick, jsxGet_onerror, jsxGet_onfocus, jsxGet_onfocusin, jsxGet_onfocusout, jsxGet_onkeydown, jsxGet_onkeypress, jsxGet_onkeyup, jsxGet_onmousedown, jsxGet_onmousemove, jsxGet_onmouseout, jsxGet_onmouseover, jsxGet_onmouseup, jsxGet_onpropertychange, jsxGet_onresize, jsxSet_onblur, jsxSet_onclick, jsxSet_oncontextmenu, jsxSet_ondblclick, jsxSet_onerror, jsxSet_onfocus, jsxSet_onfocusin, jsxSet_onfocusout, jsxSet_onkeydown, jsxSet_onkeypress, jsxSet_onkeyup, jsxSet_onmousedown, jsxSet_onmousemove, jsxSet_onmouseout, jsxSet_onmouseover, jsxSet_onmouseup, jsxSet_onpropertychange, jsxSet_onresize
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Node
executeEvent, fireEvent, getEventHandler, getEventHandlerProp, getJavaScriptNode, getParent, hasEventHandlers, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_compareDocumentPosition, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_normalize, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_ownerDocument, jsxGet_parentNode, jsxGet_previousSibling, jsxGet_textContent, jsxGet_xml, jsxSet_nodeValue, setEventHandler, setEventHandlerProp
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, clear, containsKey, containsValue, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, entrySet, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, keySet, preventExtensions, put, put, put, putAll, putConst, putConstProperty, putProperty, putProperty, redefineProperty, remove, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size, values
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

HTMLTableElement

public HTMLTableElement()
Creates an instance.

Method Detail

jsxGet_caption

public Object jsxGet_caption()
Returns the table's caption element, or null if none exists. If more than one caption is declared in the table, this method returns the first one.

Returns:
the table's caption element

jsxSet_caption

public void jsxSet_caption(Object o)
Sets the caption.

Parameters:
o - the caption

jsxGet_tFoot

public Object jsxGet_tFoot()
Returns the table's tfoot element, or null if none exists. If more than one tfoot is declared in the table, this method returns the first one.

Returns:
the table's tfoot element

jsxSet_tFoot

public void jsxSet_tFoot(Object o)
Sets the tFoot.

Parameters:
o - the tFoot

jsxGet_tHead

public Object jsxGet_tHead()
Returns the table's thead element, or null if none exists. If more than one thead is declared in the table, this method returns the first one.

Returns:
the table's thead element

jsxSet_tHead

public void jsxSet_tHead(Object o)
Sets the tHead.

Parameters:
o - the tHead

jsxGet_tBodies

public Object jsxGet_tBodies()
Returns the tbody's in the table.

Returns:
the tbody's in the table

jsxFunction_createCaption

public Object jsxFunction_createCaption()
If this table does not have a caption, this method creates an empty table caption, adds it to the table and then returns it. If one or more captions already exist, this method returns the first existing caption.

Returns:
a newly added caption if no caption exists, or the first existing caption
See Also:
MSDN Documentation

jsxFunction_createTFoot

public Object jsxFunction_createTFoot()
If this table does not have a tfoot element, this method creates an empty tfoot element, adds it to the table and then returns it. If this table already has a tfoot element, this method returns the existing tfoot element.

Returns:
a newly added caption if no caption exists, or the first existing caption
See Also:
MSDN Documentation

jsxFunction_createTHead

public Object jsxFunction_createTHead()
If this table does not have a thead element, this method creates an empty thead element, adds it to the table and then returns it. If this table already has a thead element, this method returns the existing thead element.

Returns:
a newly added caption if no caption exists, or the first existing caption
See Also:
MSDN Documentation

jsxFunction_deleteCaption

public void jsxFunction_deleteCaption()
Deletes this table's caption. If the table has multiple captions, this method deletes only the first caption. If this table does not have any captions, this method does nothing.

See Also:
MSDN Documentation

jsxFunction_deleteTFoot

public void jsxFunction_deleteTFoot()
Deletes this table's tfoot element. If the table has multiple tfoot elements, this method deletes only the first tfoot element. If this table does not have any tfoot elements, this method does nothing.

See Also:
MSDN Documentation

jsxFunction_deleteTHead

public void jsxFunction_deleteTHead()
Deletes this table's thead element. If the table has multiple thead elements, this method deletes only the first thead element. If this table does not have any thead elements, this method does nothing.

See Also:
MSDN Documentation

jsxFunction_refresh

public void jsxFunction_refresh()
Refreshes the content of this table.

See Also:
MSDN Documentation

getXPathRows

protected String getXPathRows()
Returns the XPath expression, relative to this node, enabling the retrieval of this container's rows.

Overrides:
getXPathRows in class RowContainer
Returns:
the XPath expression, relative to this node, enabling the retrieval of this container's rows

insertRow

public Object insertRow(int index)
Handle special case where table is empty. Inserts a new row at the given position.

Overrides:
insertRow in class RowContainer
Parameters:
index - the index where the row should be inserted (0 <= index < nbRows)
Returns:
the inserted row

jsxGet_width

public String jsxGet_width()
Returns the width attribute.

Returns:
the width attribute

jsxSet_width

public void jsxSet_width(String width)
Sets the width attribute.

Parameters:
width - the width attribute

jsxGet_cellSpacing

public String jsxGet_cellSpacing()
Returns the cellSpacing attribute.

Returns:
the cellSpacing attribute

jsxSet_cellSpacing

public void jsxSet_cellSpacing(String cellSpacing)
Sets the cellSpacing attribute.

Parameters:
cellSpacing - the cellSpacing attribute

jsxGet_cellPadding

public String jsxGet_cellPadding()
Returns the cellPadding attribute.

Returns:
the cellPadding attribute

jsxSet_cellPadding

public void jsxSet_cellPadding(String cellPadding)
Sets the cellPadding attribute.

Parameters:
cellPadding - the cellPadding attribute

jsxGet_border

public String jsxGet_border()
Gets the border attribute.

Returns:
the border attribute

jsxSet_border

public void jsxSet_border(String border)
Sets the border attribute.

Parameters:
border - the border attribute

jsxGet_bgColor

public String jsxGet_bgColor()
Returns the value of the bgColor attribute.

Returns:
the value of the bgColor attribute
See Also:
MSDN Documentation

jsxSet_bgColor

public void jsxSet_bgColor(String bgColor)
Sets the value of the bgColor attribute.

Parameters:
bgColor - the value of the bgColor attribute
See Also:
MSDN Documentation


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.