Java 类org.w3c.dom.html.HTMLTableRowElement 实例源码
项目:SplitCharater
文件:HTMLTableSectionElementImpl.java
int insertRowX( 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;
}
项目:SplitCharater
文件:HTMLTableSectionElementImpl.java
int deleteRowX( 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;
}
项目:SplitCharater
文件:HTMLTableElementImpl.java
public synchronized void deleteRow( int index )
{
Node child;
child = getFirstChild();
while ( child != null )
{
if ( child instanceof HTMLTableRowElement )
{
if ( index == 0 )
{
removeChild ( child );
return;
}
--index;
}
else
if ( child instanceof HTMLTableSectionElementImpl )
{
index = ( (HTMLTableSectionElementImpl) child ).deleteRowX( index );
if ( index < 0 )
return;
}
child = child.getNextSibling();
}
}
项目:SplitCharater
文件:HTMLTableCellElementImpl.java
public int getCellIndex()
{
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;
}
项目:SplitCharater
文件:HTMLTableCellElementImpl.java
public void setCellIndex( int cellIndex )
{
Node parent;
Node child;
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 );
}
项目:SplitCharater
文件:HTMLTableElementImpl.java
void insertRowX( int index, HTMLTableRowElementImpl newRow )
{
Node child;
Node lastSection = null;
child = getFirstChild();
while ( child != null )
{
if ( child instanceof HTMLTableRowElement )
{
if ( index == 0 )
{
insertBefore( newRow, child );
return;
}
}
else
if ( child instanceof HTMLTableSectionElementImpl )
{
lastSection = child;
index = ( (HTMLTableSectionElementImpl) child ).insertRowX( index, newRow );
if ( index < 0 )
return;
}
child = child.getNextSibling();
}
if ( lastSection != null )
lastSection.appendChild( newRow );
else
appendChild( newRow );
}
项目:lams
文件:WebTable.java
TableRow newTableRow( HTMLTableRowElement element ) {
return new TableRow( this, element );
}
项目:lams
文件:TableRow.java
TableRow( WebTable webTable, HTMLTableRowElement element ) {
super( element );
_element = element;
_webTable = webTable;
}