Package org.lobobrowser.html.domimpl
Class HTMLTableElementImpl
- java.lang.Object
-
- org.lobobrowser.js.AbstractScriptableDelegate
-
- org.lobobrowser.html.domimpl.NodeImpl
-
- org.lobobrowser.html.domimpl.ElementImpl
-
- org.lobobrowser.html.domimpl.HTMLElementImpl
-
- org.lobobrowser.html.domimpl.HTMLAbstractUIElement
-
- 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
Constructors Constructor Description HTMLTableElementImpl()HTMLTableElementImpl(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HTMLElementcreateCaption()Create a new table caption object or return an existing one.protected RenderStatecreateRenderState(RenderState prevRenderState)HTMLElementcreateTFoot()Create a table footer row or return an existing one.HTMLElementcreateTHead()Create a table header row or return an existing one.voiddeleteCaption()Delete the table caption, if one exists.voiddeleteRow(int index)Delete a table row.voiddeleteTFoot()Delete the footer from the table, if one exists.voiddeleteTHead()Delete the header from the table, if one exists.java.lang.StringgetAlign()Specifies the table's position with respect to the rest of the document.java.lang.StringgetBgColor()Cell background color.java.lang.StringgetBorder()The width of the border around the table.HTMLTableCaptionElementgetCaption()Returns the table'sCAPTION, or void if none exists.java.lang.StringgetCellPadding()Specifies the horizontal and vertical space between cell content and cell borders.java.lang.StringgetCellSpacing()Specifies the horizontal and vertical separation between cells.java.lang.StringgetFrame()Specifies which external table borders to render.HtmlLengthgetHeightLength(int availHeight)HTMLCollectiongetRows()Returns a collection of all the rows in the table, including all inTHEAD,TFOOT, allTBODYelements.java.lang.StringgetRules()Specifies which internal table borders to render.java.lang.StringgetSummary()Description about the purpose or structure of a table.HTMLCollectiongetTBodies()Returns a collection of the table bodies (including implicit ones).HTMLTableSectionElementgetTFoot()Returns the table'sTFOOT, ornullif none exists.HTMLTableSectionElementgetTHead()Returns the table'sTHEAD, ornullif none exists.java.lang.StringgetWidth()Specifies the desired table width.HtmlLengthgetWidthLength(int availWidth)HTMLElementinsertRow(int index)Inserts a row at the index given.voidsetAlign(java.lang.String align)Specifies the table's position with respect to the rest of the document.voidsetBgColor(java.lang.String bgColor)Cell background color.voidsetBorder(java.lang.String border)The width of the border around the table.voidsetCaption(HTMLTableCaptionElement caption)Returns the table'sCAPTION, or void if none exists.voidsetCellPadding(java.lang.String cellPadding)Specifies the horizontal and vertical space between cell content and cell borders.voidsetCellSpacing(java.lang.String cellSpacing)Specifies the horizontal and vertical separation between cells.voidsetFrame(java.lang.String frame)Specifies which external table borders to render.voidsetRules(java.lang.String rules)Specifies which internal table borders to render.voidsetSummary(java.lang.String summary)Description about the purpose or structure of a table.voidsetTFoot(HTMLTableSectionElement tFoot)Returns the table'sTFOOT, ornullif none exists.voidsetTHead(HTMLTableSectionElement tHead)Returns the table'sTHEAD, ornullif none exists.voidsetWidth(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, createDefaultStyleSheet, findStyleDeclarations, forgetLocalStyle, forgetStyle, getAncestor, getAncestorForJavaClass, getAncestorWithClass, getAncestorWithId, getAttributeAsBoolean, getAttributeAsInt, getCharset, getClassName, getComputedStyle, getCssInputSourceForDecl, getCurrentStyle, getDocumentBaseURI, getFormInputs, getOffsetHeight, getOffsetLeft, getOffsetTop, getOffsetWidth, getOuterHTML, getParent, getParentStyle, getParentWithClass, getParentWithId, getPreceedingSibling, getPreceedingSiblingElement, getPreceedingSiblingWithClass, getPreceedingSiblingWithId, getPseudoNames, getStyle, informInvalid, informInvalidAttibute, setCharset, setClassName, setCurrentStyle, setInnerHTML, setMouseOver, setStyle, toString, warn, warn
-
Methods inherited from class org.lobobrowser.html.domimpl.ElementImpl
createSimilarNode, equalAttributes, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDir, getElementsByTagName, getElementsByTagNameNS, getId, getLang, getLocalName, getNodeName, getNodeType, getNodeValue, getRawInnerText, getSchemaTypeInfo, getTagName, getTitle, hasAttribute, hasAttributeNS, hasAttributes, htmlEncodeChildText, 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, appendInnerTextImpl, cloneNode, compareDocumentPosition, findUINode, forgetRenderState, getAlignmentX, getAlignmentY, getBaseURI, getChildNodes, getChildren, getChildrenArray, getDescendents, getDocumentItem, getDocumentURL, getFeature, getFirstChild, getFullURL, getHtmlRendererContext, getInnerHTML, getInnerText, getLastChild, getNamespaceURI, getNextSibling, getNodeList, getOwnerDocument, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousSibling, getRenderState, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, informDocumentInvalid, 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.lobobrowser.html.style.CSS2PropertiesContext
informLayoutInvalid, informLookInvalid, informPositionInvalid, informSizeInvalid
-
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.html2.HTMLElement
getClassName, getDir, getId, getLang, getTitle, setClassName, setDir, setId, setLang, setTitle
-
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
-
-
-
-
Method Detail
-
getCaption
public HTMLTableCaptionElement getCaption()
Description copied from interface:HTMLTableElementReturns the table'sCAPTION, or void if none exists.- Specified by:
getCaptionin interfaceHTMLTableElement
-
setCaption
public void setCaption(HTMLTableCaptionElement caption) throws org.w3c.dom.DOMException
Description copied from interface:HTMLTableElementReturns the table'sCAPTION, or void if none exists.- Specified by:
setCaptionin interfaceHTMLTableElement- Throws:
org.w3c.dom.DOMException- HIERARCHY_REQUEST_ERR: if the element is not aCAPTION.
-
getTHead
public HTMLTableSectionElement getTHead()
Description copied from interface:HTMLTableElementReturns the table'sTHEAD, ornullif none exists.- Specified by:
getTHeadin interfaceHTMLTableElement
-
setTHead
public void setTHead(HTMLTableSectionElement tHead) throws org.w3c.dom.DOMException
Description copied from interface:HTMLTableElementReturns the table'sTHEAD, ornullif none exists.- Specified by:
setTHeadin interfaceHTMLTableElement- Throws:
org.w3c.dom.DOMException- HIERARCHY_REQUEST_ERR: if the element is not aTHEAD.
-
getTFoot
public HTMLTableSectionElement getTFoot()
Description copied from interface:HTMLTableElementReturns the table'sTFOOT, ornullif none exists.- Specified by:
getTFootin interfaceHTMLTableElement
-
setTFoot
public void setTFoot(HTMLTableSectionElement tFoot) throws org.w3c.dom.DOMException
Description copied from interface:HTMLTableElementReturns the table'sTFOOT, ornullif none exists.- Specified by:
setTFootin interfaceHTMLTableElement- Throws:
org.w3c.dom.DOMException- HIERARCHY_REQUEST_ERR: if the element is not aTFOOT.
-
getRows
public HTMLCollection getRows()
Description copied from interface:HTMLTableElementReturns a collection of all the rows in the table, including all inTHEAD,TFOOT, allTBODYelements.- Specified by:
getRowsin interfaceHTMLTableElement
-
getTBodies
public HTMLCollection getTBodies()
Description copied from interface:HTMLTableElementReturns a collection of the table bodies (including implicit ones).- Specified by:
getTBodiesin interfaceHTMLTableElement
-
getAlign
public java.lang.String getAlign()
Description copied from interface:HTMLTableElementSpecifies 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:
getAlignin interfaceHTMLTableElement
-
setAlign
public void setAlign(java.lang.String align)
Description copied from interface:HTMLTableElementSpecifies 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:
setAlignin interfaceHTMLTableElement
-
getBgColor
public java.lang.String getBgColor()
Description copied from interface:HTMLTableElementCell background color. See the bgcolor attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.- Specified by:
getBgColorin interfaceHTMLTableElement
-
setBgColor
public void setBgColor(java.lang.String bgColor)
Description copied from interface:HTMLTableElementCell background color. See the bgcolor attribute definition in HTML 4.01. This attribute is deprecated in HTML 4.01.- Specified by:
setBgColorin interfaceHTMLTableElement
-
getBorder
public java.lang.String getBorder()
Description copied from interface:HTMLTableElementThe width of the border around the table. See the border attribute definition in HTML 4.01.- Specified by:
getBorderin interfaceHTMLTableElement
-
setBorder
public void setBorder(java.lang.String border)
Description copied from interface:HTMLTableElementThe width of the border around the table. See the border attribute definition in HTML 4.01.- Specified by:
setBorderin interfaceHTMLTableElement
-
getCellPadding
public java.lang.String getCellPadding()
Description copied from interface:HTMLTableElementSpecifies the horizontal and vertical space between cell content and cell borders. See the cellpadding attribute definition in HTML 4.01.- Specified by:
getCellPaddingin interfaceHTMLTableElement
-
setCellPadding
public void setCellPadding(java.lang.String cellPadding)
Description copied from interface:HTMLTableElementSpecifies the horizontal and vertical space between cell content and cell borders. See the cellpadding attribute definition in HTML 4.01.- Specified by:
setCellPaddingin interfaceHTMLTableElement
-
getCellSpacing
public java.lang.String getCellSpacing()
Description copied from interface:HTMLTableElementSpecifies the horizontal and vertical separation between cells. See the cellspacing attribute definition in HTML 4.01.- Specified by:
getCellSpacingin interfaceHTMLTableElement
-
setCellSpacing
public void setCellSpacing(java.lang.String cellSpacing)
Description copied from interface:HTMLTableElementSpecifies the horizontal and vertical separation between cells. See the cellspacing attribute definition in HTML 4.01.- Specified by:
setCellSpacingin interfaceHTMLTableElement
-
getFrame
public java.lang.String getFrame()
Description copied from interface:HTMLTableElementSpecifies which external table borders to render. See the frame attribute definition in HTML 4.01.- Specified by:
getFramein interfaceHTMLTableElement
-
setFrame
public void setFrame(java.lang.String frame)
Description copied from interface:HTMLTableElementSpecifies which external table borders to render. See the frame attribute definition in HTML 4.01.- Specified by:
setFramein interfaceHTMLTableElement
-
getRules
public java.lang.String getRules()
Description copied from interface:HTMLTableElementSpecifies which internal table borders to render. See the rules attribute definition in HTML 4.01.- Specified by:
getRulesin interfaceHTMLTableElement
-
setRules
public void setRules(java.lang.String rules)
Description copied from interface:HTMLTableElementSpecifies which internal table borders to render. See the rules attribute definition in HTML 4.01.- Specified by:
setRulesin interfaceHTMLTableElement
-
getSummary
public java.lang.String getSummary()
Description copied from interface:HTMLTableElementDescription about the purpose or structure of a table. See the summary attribute definition in HTML 4.01.- Specified by:
getSummaryin interfaceHTMLTableElement
-
setSummary
public void setSummary(java.lang.String summary)
Description copied from interface:HTMLTableElementDescription about the purpose or structure of a table. See the summary attribute definition in HTML 4.01.- Specified by:
setSummaryin interfaceHTMLTableElement
-
getWidth
public java.lang.String getWidth()
Description copied from interface:HTMLTableElementSpecifies the desired table width. See the width attribute definition in HTML 4.01.- Specified by:
getWidthin interfaceHTMLTableElement
-
setWidth
public void setWidth(java.lang.String width)
Description copied from interface:HTMLTableElementSpecifies the desired table width. See the width attribute definition in HTML 4.01.- Specified by:
setWidthin interfaceHTMLTableElement
-
getHeightLength
public HtmlLength getHeightLength(int availHeight)
-
getWidthLength
public HtmlLength getWidthLength(int availWidth)
-
createTHead
public HTMLElement createTHead()
Description copied from interface:HTMLTableElementCreate a table header row or return an existing one.- Specified by:
createTHeadin interfaceHTMLTableElement- Returns:
- A new table header element (
THEAD).
-
deleteTHead
public void deleteTHead()
Description copied from interface:HTMLTableElementDelete the header from the table, if one exists.- Specified by:
deleteTHeadin interfaceHTMLTableElement
-
createTFoot
public HTMLElement createTFoot()
Description copied from interface:HTMLTableElementCreate a table footer row or return an existing one.- Specified by:
createTFootin interfaceHTMLTableElement- Returns:
- A footer element (
TFOOT).
-
deleteTFoot
public void deleteTFoot()
Description copied from interface:HTMLTableElementDelete the footer from the table, if one exists.- Specified by:
deleteTFootin interfaceHTMLTableElement
-
createCaption
public HTMLElement createCaption()
Description copied from interface:HTMLTableElementCreate a new table caption object or return an existing one.- Specified by:
createCaptionin interfaceHTMLTableElement- Returns:
- A
CAPTIONelement.
-
deleteCaption
public void deleteCaption()
Description copied from interface:HTMLTableElementDelete the table caption, if one exists.- Specified by:
deleteCaptionin interfaceHTMLTableElement
-
insertRow
public HTMLElement insertRow(int index) throws org.w3c.dom.DOMException
Inserts a row at the index given. Ifindexis-1, the row is appended as the last row.- Specified by:
insertRowin interfaceHTMLTableElement- 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.DOMExceptionDescription copied from interface:HTMLTableElementDelete a table row.- Specified by:
deleteRowin interfaceHTMLTableElement- 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:
createRenderStatein classHTMLElementImpl
-
-