Package org.w3c.dom.html

Examples of org.w3c.dom.html.HTMLTableSectionElement


                HTMLTableRowElement rowElem = (HTMLTableRowElement)parentElement;
                return new HTMLCollectionAsElementListImpl(rowElem,rowElem.getCells(),getItsNatDocumentImpl());
            }
            else if (parentElement instanceof HTMLTableSectionElement)
            {
                HTMLTableSectionElement sectionElem = (HTMLTableSectionElement)parentElement;
                return new HTMLCollectionAsElementListImpl(sectionElem,sectionElem.getRows(),getItsNatDocumentImpl());
            }
            else
                return super.createElementListFree(parentElement,false);
        }
    }
View Full Code Here


    }

    public int getRowIndex()
    {
        // No admitimos que un <row> est� directamente bajo <table>
        HTMLTableSectionElement section = (HTMLTableSectionElement)getParentNode();
        HTMLTableElement table = (HTMLTableElement)section.getParentNode();
        LinkedList<Node> rows = HTMLTableElementImpl.getRowsArray(table);
        // rows NO puede ser nulo pues est� dentro este <row>
        int i = 0;
        for(Iterator<Node> it = rows.iterator(); it.hasNext(); i++)
            if (it.next() == this) return i;
View Full Code Here

    }

    public int getSectionRowIndex()
    {
        // No admitimos que un <row> est� directamente bajo <table>
        HTMLTableSectionElement section = (HTMLTableSectionElement)getParentNode();
        LinkedList<Node> rows = DOMUtilInternal.getChildElementListWithTagNameNS(section,NamespaceUtil.XHTML_NAMESPACE,"tr",false);
        // rows NO puede ser nulo pues est� dentro este <row>
        int i = 0;
        for(Iterator<Node> it = rows.iterator(); it.hasNext(); i++)
        {
View Full Code Here

    {
        if (contentParent instanceof HTMLTableElement)
        {
            // Estructura guiada por un <table> (por ejemplo):
            // <table><tbody><tr><td><img src="Handle" /></td><td><img src="Icon" /></td><td>Label</td></tr></td></table>
            HTMLTableSectionElement tbody = (HTMLTableSectionElement)ItsNatTreeWalker.getFirstChildElement(contentParent);
            HTMLTableRowElement row = (HTMLTableRowElement)ItsNatTreeWalker.getFirstChildElement(tbody);
            return getHandleElement(row);
        }
        else
        {
View Full Code Here

        return (HTMLTableSectionElement)node;
    }

    public HTMLTableRowElement getHTMLTableRowElement()
    {
        HTMLTableSectionElement tHeadElement = getHTMLTableSectionElement();
        return (HTMLTableRowElement)ItsNatTreeWalker.getFirstChildElementWithTagNameNS(tHeadElement,NamespaceUtil.XHTML_NAMESPACE,"tr");
    }
View Full Code Here

        return null;
    }

    public void deleteTableSection(String localName)
    {
        HTMLTableSectionElement section = getTableSection(localName);
        if (section != null)
            removeChild( section );
    }
View Full Code Here

        else
        {
            if (localName.equals("thead"))
            {
                // <thead> est� antes que <tfoot>
                HTMLTableSectionElement tfoot = getTFoot();
                if (tfoot != null)
                {
                    insertBefore(section,tfoot);
                }
                else
                {
                    // O al menos antes del primer <tbody>
                    HTMLTableSectionElement tbody = getTableSection("tbody");
                    if (tbody != null)
                        insertBefore(section,tbody);
                    else
                        appendChild(section); // Al final entonces
                }
            }
            else if (localName.equals("tfoot"))
            {
                // <tfoot> est� antes que el primer <tbody>
                HTMLTableSectionElement tbody = getTableSection("tbody");
                if (tbody != null)
                    insertBefore(section,tbody);
                else
                    appendChild(section); // Al final entonces
            }
View Full Code Here

        }
    }

    public HTMLTableSectionElement createTableSection(String localName)
    {
        HTMLTableSectionElement section = getTableSection(localName);
        if (section != null)
            return section;
        section = (HTMLTableSectionElement)getOwnerDocument().createElementNS(NamespaceUtil.XHTML_NAMESPACE,localName);
        setTableSection(section,localName);
        return section;
View Full Code Here

                HTMLTableRowElement rowRef = (HTMLTableRowElement)rows.get(index);
                rowRef.getParentNode().insertBefore(newRow,rowRef);
            }
            else // index == len  A�adir al final
            {
                HTMLTableSectionElement tbody = (HTMLTableSectionElement)getTBodies().item(0);
                if (tbody == null)
                {
                    tbody = (HTMLTableSectionElement)getOwnerDocument().createElementNS(NamespaceUtil.XHTML_NAMESPACE,"tbody");
                    appendChild(tbody);
                }
                tbody.appendChild(newRow);
            }
        }
        else if (index > 0) throw new DOMException(DOMException.INDEX_SIZE_ERR,"Index " + index + " is greater than the number of rows: 0");
        else
        {
            HTMLTableSectionElement tbody = (HTMLTableSectionElement)getTBodies().item(0);
            if (tbody == null)
            {
                tbody = (HTMLTableSectionElement)getOwnerDocument().createElementNS(NamespaceUtil.XHTML_NAMESPACE,"tbody");
                appendChild(tbody);
            }
            tbody.appendChild(newRow);
        }
        return newRow;
    }
View Full Code Here

            public Element getRowContentElement(ElementTable table,int row,Element elem)
            {
                HTMLTableRowElement rowElem = (HTMLTableRowElement)elem;
                HTMLTableCellElement cellElem = (HTMLTableCellElement)ItsNatTreeWalker.getFirstChildElement(rowElem);
                HTMLTableElement tableElem = (HTMLTableElement)ItsNatTreeWalker.getFirstChildElement(cellElem);
                HTMLTableSectionElement tbodyElem = (HTMLTableSectionElement)ItsNatTreeWalker.getFirstChildElement(tableElem);
                HTMLTableRowElement rowElem2 = (HTMLTableRowElement)ItsNatTreeWalker.getFirstChildElement(tbodyElem);
                return rowElem2;
            }

            public Element getCellContentElement(ElementTable table,int row,int col,Element elem)
            {
                HTMLTableCellElement cellElem = (HTMLTableCellElement)elem;
                HTMLTableElement tableElem = (HTMLTableElement)ItsNatTreeWalker.getFirstChildElement(cellElem);
                HTMLTableSectionElement tbodyElem = (HTMLTableSectionElement)ItsNatTreeWalker.getFirstChildElement(tableElem);
                HTMLTableRowElement rowElem = (HTMLTableRowElement)ItsNatTreeWalker.getFirstChildElement(tbodyElem);
                HTMLTableCellElement cellElem2 = (HTMLTableCellElement)ItsNatTreeWalker.getFirstChildElement(rowElem);
                return cellElem2;
            }
View Full Code Here

TOP

Related Classes of org.w3c.dom.html.HTMLTableSectionElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.