org.lobobrowser.html.domimpl
Class HTMLTableElementImpl

java.lang.Object
  extended by org.lobobrowser.js.AbstractScriptableDelegate
      extended by org.lobobrowser.html.domimpl.NodeImpl
          extended by org.lobobrowser.html.domimpl.ElementImpl
              extended by org.lobobrowser.html.domimpl.HTMLElementImpl
                  extended by org.lobobrowser.html.domimpl.HTMLAbstractUIElement
                      extended by org.lobobrowser.html.domimpl.HTMLTableElementImpl
All Implemented Interfaces:
ModelNode, CSS2PropertiesContext, ScriptableDelegate, org.w3c.dom.Element, HTMLElement, HTMLTableElement, org.w3c.dom.Node

public class HTMLTableElementImpl
extends HTMLAbstractUIElement
implements HTMLTableElement


Field Summary
 
Fields inherited from class org.lobobrowser.html.domimpl.ElementImpl
attributes
 
Fields inherited from class org.lobobrowser.html.domimpl.NodeImpl
document, logger, nodeList, notificationsSuspended, parentNode, treeLock, uiNode
 
Fields inherited from interface org.w3c.dom.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
 
Constructor Summary
HTMLTableElementImpl()
           
HTMLTableElementImpl(java.lang.String name)
           
 
Method Summary
 HTMLElement createCaption()
          Create a new table caption object or return an existing one.
protected  RenderState createRenderState(RenderState prevRenderState)
           
 HTMLElement createTFoot()
          Create a table footer row or return an existing one.
 HTMLElement createTHead()
          Create a table header row or return an existing one.
 void deleteCaption()
          Delete the table caption, if one exists.
 void deleteRow(int index)
          Delete a table row.
 void deleteTFoot()
          Delete the footer from the table, if one exists.
 void deleteTHead()
          Delete the header from the table, if one exists.
 java.lang.String getAlign()
          Specifies the table's position with respect to the rest of the document.
 java.lang.String getBgColor()
          Cell background color.
 java.lang.String getBorder()
          The width of the border around the table.
 HTMLTableCaptionElement getCaption()
          Returns the table's CAPTION, or void if none exists.
 java.lang.String getCellPadding()
          Specifies the horizontal and vertical space between cell content and cell borders.
 java.lang.String getCellSpacing()
          Specifies the horizontal and vertical separation between cells.
 java.lang.String getFrame()
          Specifies which external table borders to render.
 HtmlLength getHeightLength(int availHeight)
           
 HTMLCollection getRows()
          Returns a collection of all the rows in the table, including all in THEAD, TFOOT, all TBODY elements.
 java.lang.String getRules()
          Specifies which internal table borders to render.
 java.lang.String getSummary()
          Description about the purpose or structure of a table.
 HTMLCollection getTBodies()
          Returns a collection of the table bodies (including implicit ones).
 HTMLTableSectionElement getTFoot()
          Returns the table's TFOOT, or null if none exists.
 HTMLTableSectionElement getTHead()
          Returns the table's THEAD, or null if none exists.
 java.lang.String getWidth()
          Specifies the desired table width.
 HtmlLength getWidthLength(int availWidth)
           
 HTMLElement insertRow(int index)
          Inserts a row at the index given.
 void setAlign(java.lang.String align)
          Specifies the table's position with respect to the rest of the document.
 void setBgColor(java.lang.String bgColor)
          Cell background color.
 void setBorder(java.lang.String border)
          The width of the border around the table.
 void setCaption(HTMLTableCaptionElement caption)
          Returns the table's CAPTION, or void if none exists.
 void setCellPadding(java.lang.String cellPadding)
          Specifies the horizontal and vertical space between cell content and cell borders.
 void setCellSpacing(java.lang.String cellSpacing)
          Specifies the horizontal and vertical separation between cells.
 void setFrame(java.lang.String frame)
          Specifies which external table borders to render.
 void setRules(java.lang.String rules)
          Specifies which internal table borders to render.
 void setSummary(java.lang.String summary)
          Description about the purpose or structure of a table.
 void setTFoot(HTMLTableSectionElement tFoot)
          Returns the table's TFOOT, or null if none exists.
 void setTHead(HTMLTableSectionElement tHead)
          Returns the table's THEAD, or null if none exists.
 void setWidth(java.lang.String width)
          Specifies the desired table width.
 
Methods inherited from class org.lobobrowser.html.domimpl.HTMLAbstractUIElement
assignAttributeField, blur, focus, getEventFunction, getOnblur, getOnclick, getOncontextmenu, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, setOnblur, setOnclick, setOncontextmenu, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup
 
Methods inherited from class org.lobobrowser.html.domimpl.HTMLElementImpl
addStyleSheetDeclarations, appendOuterHTMLImpl, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getComputedStyle, getCssInputSourceForDecl, getCurrentStyle, getDocumentBaseURI, getFormInputs, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParentStyle, getPseudoNames, getStyle, informInvalid, informInvalidAttibute, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn
 
Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl
appendInnerTextImpl, createSimilarNode, equalAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getInnerText, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, isTagName, normalizeAttributeName, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeImpl, setAttributeNode, setAttributeNodeNS, setAttributeNS, setDir, setId, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInnerText, setLang, setNodeValue, setTitle
 
Methods inherited from class org.lobobrowser.html.domimpl.NodeImpl
appendChild, appendInnerHTMLImpl, cloneNode, compareDocumentPosition, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informExternalScriptLoading, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeAllChildren, removeAllChildrenImpl, removeChild, removeChildAt, removeChildren, removeChildrenImpl, replaceAdjacentTextNodes, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setPrefix, setTextContent, setUINode, setUserData
 
Methods inherited from class org.lobobrowser.js.AbstractScriptableDelegate
getScriptable, setScriptable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.html2.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.lobobrowser.html.style.CSS2PropertiesContext
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
 

Constructor Detail

HTMLTableElementImpl

public HTMLTableElementImpl()

HTMLTableElementImpl

public HTMLTableElementImpl(java.lang.String name)
Method Detail

getCaption

public HTMLTableCaptionElement getCaption()
Description copied from interface: HTMLTableElement
Returns the table's CAPTION, or void if none exists.

Specified by:
getCaption in interface HTMLTableElement

setCaption

public void setCaption(HTMLTableCaptionElement caption)
                throws org.w3c.dom.DOMException
Description copied from interface: HTMLTableElement
Returns the table's CAPTION, or void if none exists.

Specified by:
setCaption in interface HTMLTableElement
Throws:
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: if the element is not a CAPTION.

getTHead

public HTMLTableSectionElement getTHead()
Description copied from interface: HTMLTableElement
Returns the table's THEAD, or null if none exists.

Specified by:
getTHead in interface HTMLTableElement

setTHead

public void setTHead(HTMLTableSectionElement tHead)
              throws org.w3c.dom.DOMException
Description copied from interface: HTMLTableElement
Returns the table's THEAD, or null if none exists.

Specified by:
setTHead in interface HTMLTableElement
Throws:
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: if the element is not a THEAD.

getTFoot

public HTMLTableSectionElement getTFoot()
Description copied from interface: HTMLTableElement
Returns the table's TFOOT, or null if none exists.

Specified by:
getTFoot in interface HTMLTableElement

setTFoot

public void setTFoot(HTMLTableSectionElement tFoot)
              throws org.w3c.dom.DOMException
Description copied from interface: HTMLTableElement
Returns the table's TFOOT, or null if none exists.

Specified by:
setTFoot in interface HTMLTableElement
Throws:
org.w3c.dom.DOMException - HIERARCHY_REQUEST_ERR: if the element is not a TFOOT.

getRows

public HTMLCollection getRows()
Description copied from interface: HTMLTableElement
Returns a collection of all the rows in the table, including all in THEAD, TFOOT, all TBODY elements.

Specified by:
getRows in interface HTMLTableElement

getTBodies

public HTMLCollection getTBodies()
Description copied from interface: HTMLTableElement
Returns a collection of the table bodies (including implicit ones).

Specified by:
getTBodies in interface HTMLTableElement

getAlign

public java.lang.String getAlign()
Description copied from interface: HTMLTableElement
Specifies the table's position with respect to the rest of the document. See the align attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.

Specified by:
getAlign in interface HTMLTableElement

setAlign

public void setAlign(java.lang.String align)
Description copied from interface: HTMLTableElement
Specifies the table's position with respect to the rest of the document. See the align attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.

Specified by:
setAlign in interface HTMLTableElement

getBgColor

public java.lang.String getBgColor()
Description copied from interface: HTMLTableElement
Cell background color. See the bgcolor attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.

Specified by:
getBgColor in interface HTMLTableElement

setBgColor

public void setBgColor(java.lang.String bgColor)
Description copied from interface: HTMLTableElement
Cell background color. See the bgcolor attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.

Specified by:
setBgColor in interface HTMLTableElement

getBorder

public java.lang.String getBorder()
Description copied from interface: HTMLTableElement
The width of the border around the table. See the border attribute definition in HTML 4.01.

Specified by:
getBorder in interface HTMLTableElement

setBorder

public void setBorder(java.lang.String border)
Description copied from interface: HTMLTableElement
The width of the border around the table. See the border attribute definition in HTML 4.01.

Specified by:
setBorder in interface HTMLTableElement

getCellPadding

public java.lang.String getCellPadding()
Description copied from interface: HTMLTableElement
Specifies the horizontal and vertical space between cell content and cell borders. See the cellpadding attribute definition in HTML 4.01.

Specified by:
getCellPadding in interface HTMLTableElement

setCellPadding

public void setCellPadding(java.lang.String cellPadding)
Description copied from interface: HTMLTableElement
Specifies the horizontal and vertical space between cell content and cell borders. See the cellpadding attribute definition in HTML 4.01.

Specified by:
setCellPadding in interface HTMLTableElement

getCellSpacing

public java.lang.String getCellSpacing()
Description copied from interface: HTMLTableElement
Specifies the horizontal and vertical separation between cells. See the cellspacing attribute definition in HTML 4.01.

Specified by:
getCellSpacing in interface HTMLTableElement

setCellSpacing

public void setCellSpacing(java.lang.String cellSpacing)
Description copied from interface: HTMLTableElement
Specifies the horizontal and vertical separation between cells. See the cellspacing attribute definition in HTML 4.01.

Specified by:
setCellSpacing in interface HTMLTableElement

getFrame

public java.lang.String getFrame()
Description copied from interface: HTMLTableElement
Specifies which external table borders to render. See the frame attribute definition in HTML 4.01.

Specified by:
getFrame in interface HTMLTableElement

setFrame

public void setFrame(java.lang.String frame)
Description copied from interface: HTMLTableElement
Specifies which external table borders to render. See the frame attribute definition in HTML 4.01.

Specified by:
setFrame in interface HTMLTableElement

getRules

public java.lang.String getRules()
Description copied from interface: HTMLTableElement
Specifies which internal table borders to render. See the rules attribute definition in HTML 4.01.

Specified by:
getRules in interface HTMLTableElement

setRules

public void setRules(java.lang.String rules)
Description copied from interface: HTMLTableElement
Specifies which internal table borders to render. See the rules attribute definition in HTML 4.01.

Specified by:
setRules in interface HTMLTableElement

getSummary

public java.lang.String getSummary()
Description copied from interface: HTMLTableElement
Description about the purpose or structure of a table. See the summary attribute definition in HTML 4.01.

Specified by:
getSummary in interface HTMLTableElement

setSummary

public void setSummary(java.lang.String summary)
Description copied from interface: HTMLTableElement
Description about the purpose or structure of a table. See the summary attribute definition in HTML 4.01.

Specified by:
setSummary in interface HTMLTableElement

getWidth

public java.lang.String getWidth()
Description copied from interface: HTMLTableElement
Specifies the desired table width. See the width attribute definition in HTML 4.01.

Specified by:
getWidth in interface HTMLTableElement

setWidth

public void setWidth(java.lang.String width)
Description copied from interface: HTMLTableElement
Specifies the desired table width. See the width attribute definition in HTML 4.01.

Specified by:
setWidth in interface HTMLTableElement

getHeightLength

public HtmlLength getHeightLength(int availHeight)

getWidthLength

public HtmlLength getWidthLength(int availWidth)

createTHead

public HTMLElement createTHead()
Description copied from interface: HTMLTableElement
Create a table header row or return an existing one.

Specified by:
createTHead in interface HTMLTableElement
Returns:
A new table header element (THEAD).

deleteTHead

public void deleteTHead()
Description copied from interface: HTMLTableElement
Delete the header from the table, if one exists.

Specified by:
deleteTHead in interface HTMLTableElement

createTFoot

public HTMLElement createTFoot()
Description copied from interface: HTMLTableElement
Create a table footer row or return an existing one.

Specified by:
createTFoot in interface HTMLTableElement
Returns:
A footer element (TFOOT).

deleteTFoot

public void deleteTFoot()
Description copied from interface: HTMLTableElement
Delete the footer from the table, if one exists.

Specified by:
deleteTFoot in interface HTMLTableElement

createCaption

public HTMLElement createCaption()
Description copied from interface: HTMLTableElement
Create a new table caption object or return an existing one.

Specified by:
createCaption in interface HTMLTableElement
Returns:
A CAPTION element.

deleteCaption

public void deleteCaption()
Description copied from interface: HTMLTableElement
Delete the table caption, if one exists.

Specified by:
deleteCaption in interface HTMLTableElement

insertRow

public HTMLElement insertRow(int index)
                      throws org.w3c.dom.DOMException
Inserts a row at the index given. If index is -1, the row is appended as the last row.

Specified by:
insertRow in interface HTMLTableElement
Parameters:
index - The row number where to insert a new row. This index starts from 0 and is relative to the logical order (not document order) of all the rows contained inside the table.
Returns:
The newly created row.
Throws:
org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified index is greater than the number of rows or if the index is a negative number other than -1.

deleteRow

public void deleteRow(int index)
               throws org.w3c.dom.DOMException
Description copied from interface: HTMLTableElement
Delete a table row.

Specified by:
deleteRow in interface HTMLTableElement
Parameters:
index - The index of the row to be deleted. This index starts from 0 and is relative to the logical order (not document order) of all the rows contained inside the table. If the index is -1 the last row in the table is deleted.
Throws:
org.w3c.dom.DOMException - INDEX_SIZE_ERR: Raised if the specified index is greater than or equal to the number of rows or if the index is a negative number other than -1.

createRenderState

protected RenderState createRenderState(RenderState prevRenderState)
Overrides:
createRenderState in class HTMLElementImpl