FileDocCategorySizeDatePackage
HTMLTableCellElementImpl.javaAPI DocJava SE 5 API8014Fri Aug 26 14:55:28 BST 2005com.sun.org.apache.html.internal.dom

HTMLTableCellElementImpl

public class HTMLTableCellElementImpl extends HTMLElementImpl implements HTMLTableCellElement
version
$Revision: 1.6 $ $Date: 2003/05/08 20:13:09 $
author
Assaf Arkin
see
org.w3c.dom.html.HTMLTableCellElement
see
com.sun.org.apache.xerces.internal.dom.ElementImpl

Fields Summary
Constructors Summary
public HTMLTableCellElementImpl(HTMLDocumentImpl owner, String name)
Constructor requires owner document.

param
owner The owner HTML document

        super( owner, name );
    
Methods Summary
public java.lang.StringgetAbbr()

        return getAttribute( "abbr" );
    
public java.lang.StringgetAlign()

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

        return getAttribute( "axis" );
    
public java.lang.StringgetBgColor()

        return getAttribute( "bgcolor" );
    
public intgetCellIndex()

        Node    parent;
        Node    child;
        int        index;
        
        parent = getParentNode();
        index = 0;
        if ( parent instanceof HTMLTableRowElement )
        {
            child = parent.getFirstChild();
            while ( child != null )
            {
                if ( child instanceof HTMLTableCellElement )
                {
                    if ( child == this )
                        return index;
                    ++ index;
                }
                child = child.getNextSibling();
            }
        }
        return -1;
    
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 intgetColSpan()

        return getInteger( getAttribute( "colspan" ) );
    
public java.lang.StringgetHeaders()

        return getAttribute( "headers" );
    
public java.lang.StringgetHeight()

        return getAttribute( "height" );
    
public booleangetNoWrap()

        return getBinary( "nowrap" );
    
public intgetRowSpan()

        return getInteger( getAttribute( "rowspan" ) );
    
public java.lang.StringgetScope()

        return getAttribute( "scope" );
    
public java.lang.StringgetVAlign()

        return capitalize( getAttribute( "valign" ) );
    
public java.lang.StringgetWidth()

        return getAttribute( "width" );
    
public voidsetAbbr(java.lang.String abbr)

        setAttribute( "abbr", abbr );
    
public voidsetAlign(java.lang.String align)

        setAttribute( "align", align );
    
public voidsetAxis(java.lang.String axis)

        setAttribute( "axis", axis );
    
public voidsetBgColor(java.lang.String bgColor)

        setAttribute( "bgcolor", bgColor );
    
public voidsetCellIndex(int cellIndex)

        Node    parent;
        Node    child;
        int        index;
        
        parent = getParentNode();
        if ( parent instanceof HTMLTableRowElement )
        {
            child = parent.getFirstChild();
            while ( child != null )
            {
                if ( child instanceof HTMLTableCellElement )
                {
                    if ( cellIndex == 0 )
                    {
                        if ( this != child )
                            parent.insertBefore( this, child );
                        return;
                    }
                    -- cellIndex;
                }
                child = child.getNextSibling();
            }
        }
        parent.appendChild( this );
    
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 voidsetColSpan(int colspan)

        setAttribute( "colspan", String.valueOf( colspan ) );
    
public voidsetHeaders(java.lang.String headers)

        setAttribute( "headers", headers );
    
public voidsetHeight(java.lang.String height)

        setAttribute( "height", height );
    
public voidsetNoWrap(boolean noWrap)

        setAttribute( "nowrap", noWrap );
    
public voidsetRowSpan(int rowspan)

        setAttribute( "rowspan", String.valueOf( rowspan ) );
    
public voidsetScope(java.lang.String scope)

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

        setAttribute( "valign", vAlign );
    
public voidsetWidth(java.lang.String width)

        setAttribute( "width", width );