FileDocCategorySizeDatePackage
HTMLTableSectionElementImpl.javaAPI DocApache Xerces 3.0.15067Fri Sep 14 20:33:56 BST 2007org.apache.html.dom

HTMLTableSectionElementImpl

public class HTMLTableSectionElementImpl extends HTMLElementImpl implements HTMLTableSectionElement
xerces.internal
version
$Revision: 447255 $ $Date: 2006-09-18 01:36:42 -0400 (Mon, 18 Sep 2006) $
author
Assaf Arkin
see
org.w3c.dom.html.HTMLTableSectionElement
see
org.apache.xerces.dom.ElementImpl

Fields Summary
private static final long
serialVersionUID
private HTMLCollectionImpl
_rows
Constructors Summary
public HTMLTableSectionElementImpl(HTMLDocumentImpl owner, String name)
Constructor requires owner document.

param
owner The owner HTML document

        super( owner, name );
    
Methods Summary
public org.w3c.dom.NodecloneNode(boolean deep)
Explicit implementation of cloneNode() to ensure that cache used for getRows() gets cleared.

        HTMLTableSectionElementImpl clonedNode = (HTMLTableSectionElementImpl)super.cloneNode( deep );
        clonedNode._rows = null;
        return clonedNode;
    
public voiddeleteRow(int index)

        deleteRowX( index );
    
intdeleteRowX(int index)

        Node    child;
        
        child = getFirstChild();
        while ( child != null )
        {
            if ( child instanceof HTMLTableRowElement )
            {
                if ( index == 0 )
                {
                    removeChild ( child );
                    return -1;
                }
                --index;
            }
            child = child.getNextSibling();
        }
        return index;
    
public java.lang.StringgetAlign()


      
    
        return capitalize( getAttribute( "align" ) );
    
public java.lang.StringgetCh()

        String    ch;
        
        // Make sure that the access key is a single character.
        ch = getAttribute( "char" );
        if ( ch != null && ch.length() > 1 )
            ch = ch.substring( 0, 1 );
        return ch;
    
public java.lang.StringgetChOff()

        return getAttribute( "charoff" );
    
public org.w3c.dom.html.HTMLCollectiongetRows()

        if ( _rows == null )
            _rows = new HTMLCollectionImpl( this, HTMLCollectionImpl.ROW );
        return _rows;
    
public java.lang.StringgetVAlign()

        return capitalize( getAttribute( "valign" ) );
    
public org.w3c.dom.html.HTMLElementinsertRow(int index)

        HTMLTableRowElementImpl    newRow;
        
        newRow = new HTMLTableRowElementImpl( (HTMLDocumentImpl) getOwnerDocument(), "TR" );
        newRow.insertCell( 0 );
        if ( insertRowX( index, newRow ) >= 0 )
            appendChild( newRow );
        return newRow;
    
intinsertRowX(int index, HTMLTableRowElementImpl newRow)

        Node    child;
        
        child = getFirstChild();
        while ( child != null )
        {
            if ( child instanceof HTMLTableRowElement )
            {
                if ( index == 0 )
                {
                    insertBefore( newRow, child );
                    return -1;
                }
                --index;
            }
            child = child.getNextSibling();
        }
        return index;
    
public voidsetAlign(java.lang.String align)

        setAttribute( "align", align );
    
public voidsetCh(java.lang.String ch)

        // Make sure that the access key is a single character.
        if ( ch != null && ch.length() > 1 )
            ch = ch.substring( 0, 1 );
        setAttribute( "char", ch );
    
public voidsetChOff(java.lang.String chOff)

        setAttribute( "charoff", chOff );
    
public voidsetVAlign(java.lang.String vAlign)

        setAttribute( "valign", vAlign );