# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# html_table.cpp

    00001
    00022 // --------------------------------------------------------------------------
    00023
    00024 #include "dom/html_misc.h"
    00025 #include "dom/html_table.h"
    00026 #include "dom/dom_exception.h"
    00027
    00028 #include "html/html_miscimpl.h"
    00029 #include "html/html_tableimpl.h"
    00030 #include "misc/htmlhashes.h"
    00031
    00032 using namespace DOM;
    00033
    00034 HTMLTableCaptionElement::HTMLTableCaptionElement() : HTMLElement()
    00035 {
    00036 }
    00037
    00038 HTMLTableCaptionElement::HTMLTableCaptionElement(const HTMLTableCaptionElement &other) : HTMLElement(other)
    00039 {
    00040 }
    00041
    00042 HTMLTableCaptionElement::HTMLTableCaptionElement(HTMLTableCaptionElementImpl *impl) : HTMLElement(impl)
    00043 {
    00044 }
    00045
    00046 HTMLTableCaptionElement &HTMLTableCaptionElement::operator = (const Node &other)
    00047 {
    00048     assignOther( other, ID_CAPTION );
    00049     return *this;
    00050 }
    00051
    00052 HTMLTableCaptionElement &HTMLTableCaptionElement::operator = (const HTMLTableCaptionElement &other)
    00053 {
    00054     HTMLElement::operator = (other);
    00055     return *this;
    00056 }
    00057
    00058 HTMLTableCaptionElement::~HTMLTableCaptionElement()
    00059 {
    00060 }
    00061
    00062 DOMString HTMLTableCaptionElement::align() const
    00063 {
    00064     if(!impl) return DOMString();
    00065     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00066 }
    00067
    00068 void HTMLTableCaptionElement::setAlign( const DOMString &value )
    00069 {
    00070     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00071 }
    00072
    00073 // --------------------------------------------------------------------------
    00074
    00075 HTMLTableCellElement::HTMLTableCellElement() : HTMLElement()
    00076 {
    00077 }
    00078
    00079 HTMLTableCellElement::HTMLTableCellElement(const HTMLTableCellElement &other) : HTMLElement(other)
    00080 {
    00081 }
    00082
    00083 HTMLTableCellElement::HTMLTableCellElement(HTMLTableCellElementImpl *impl) : HTMLElement(impl)
    00084 {
    00085 }
    00086
    00087 HTMLTableCellElement &HTMLTableCellElement::operator = (const Node &other)
    00088 {
    00089     if( other.elementId() != ID_TD &&
    00090     other.elementId() != ID_TH )
    00091     {
    00092     if ( impl ) impl->deref();
    00093     impl = 0;
    00094     } else {
    00095     Node::operator = (other);
    00096     }
    00097     return *this;
    00098 }
    00099
    00100 HTMLTableCellElement &HTMLTableCellElement::operator = (const HTMLTableCellElement &other)
    00101 {
    00102     HTMLElement::operator = (other);
    00103     return *this;
    00104 }
    00105
    00106 HTMLTableCellElement::~HTMLTableCellElement()
    00107 {
    00108 }
    00109
    00110 long HTMLTableCellElement::cellIndex() const
    00111 {
    00112     if(!impl) return 0;
    00113     return ((HTMLTableCellElementImpl *)impl)->cellIndex();
    00114 }
    00115
    00116 void HTMLTableCellElement::setCellIndex( long /*_cellIndex*/ )
    00117 {
    00118     throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
    00119 }
    00120
    00121 DOMString HTMLTableCellElement::abbr() const
    00122 {
    00123     if(!impl) return DOMString();
    00124     return ((ElementImpl *)impl)->getAttribute(ATTR_ABBR);
    00125 }
    00126
    00127 void HTMLTableCellElement::setAbbr( const DOMString &value )
    00128 {
    00129     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ABBR, value);
    00130 }
    00131
    00132 DOMString HTMLTableCellElement::align() const
    00133 {
    00134     if(!impl) return DOMString();
    00135     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00136 }
    00137
    00138 void HTMLTableCellElement::setAlign( const DOMString &value )
    00139 {
    00140     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00141 }
    00142
    00143 DOMString HTMLTableCellElement::axis() const
    00144 {
    00145     if(!impl) return DOMString();
    00146     return ((ElementImpl *)impl)->getAttribute(ATTR_AXIS);
    00147 }
    00148
    00149 void HTMLTableCellElement::setAxis( const DOMString &value )
    00150 {
    00151     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_AXIS, value);
    00152 }
    00153
    00154 DOMString HTMLTableCellElement::bgColor() const
    00155 {
    00156     if(!impl) return DOMString();
    00157     return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
    00158 }
    00159
    00160 void HTMLTableCellElement::setBgColor( const DOMString &value )
    00161 {
    00162     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
    00163 }
    00164
    00165 DOMString HTMLTableCellElement::ch() const
    00166 {
    00167     if(!impl) return DOMString();
    00168     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
    00169 }
    00170
    00171 void HTMLTableCellElement::setCh( const DOMString &value )
    00172 {
    00173     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
    00174 }
    00175
    00176 DOMString HTMLTableCellElement::chOff() const
    00177 {
    00178     if(!impl) return DOMString();
    00179     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
    00180 }
    00181
    00182 void HTMLTableCellElement::setChOff( const DOMString &value )
    00183 {
    00184     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
    00185 }
    00186
    00187 long HTMLTableCellElement::colSpan() const
    00188 {
    00189     if(!impl) return 0;
    00190     return ((ElementImpl *)impl)->getAttribute(ATTR_COLSPAN).toInt();
    00191 }
    00192
    00193 void HTMLTableCellElement::setColSpan( long _colSpan )
    00194 {
    00195     if(impl) {
    00196     DOMString value(QString::number(_colSpan));
    00197         ((ElementImpl *)impl)->setAttribute(ATTR_COLSPAN,value);
    00198     }
    00199 }
    00200
    00201 DOMString HTMLTableCellElement::headers() const
    00202 {
    00203     if(!impl) return DOMString();
    00204     return ((ElementImpl *)impl)->getAttribute(ATTR_HEADERS);
    00205 }
    00206
    00207 void HTMLTableCellElement::setHeaders( const DOMString &value )
    00208 {
    00209     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEADERS, value);
    00210 }
    00211
    00212 DOMString HTMLTableCellElement::height() const
    00213 {
    00214     if(!impl) return DOMString();
    00215     return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
    00216 }
    00217
    00218 void HTMLTableCellElement::setHeight( const DOMString &value )
    00219 {
    00220     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
    00221 }
    00222
    00223 bool HTMLTableCellElement::noWrap() const
    00224 {
    00225     if(!impl) return false;
    00226     return !((ElementImpl *)impl)->getAttribute(ATTR_NOWRAP).isNull();
    00227 }
    00228
    00229 void HTMLTableCellElement::setNoWrap( bool _noWrap )
    00230 {
    00231     if(impl)
    00232     ((ElementImpl *)impl)->setAttribute(ATTR_NOWRAP, _noWrap ? "" : 0);
    00233 }
    00234
    00235 long HTMLTableCellElement::rowSpan() const
    00236 {
    00237     if(!impl) return 0;
    00238     return ((ElementImpl *)impl)->getAttribute(ATTR_ROWSPAN).toInt();
    00239 }
    00240
    00241 void HTMLTableCellElement::setRowSpan( long _rowSpan )
    00242 {
    00243     if(impl) {
    00244     DOMString value(QString::number(_rowSpan));
    00245         ((ElementImpl *)impl)->setAttribute(ATTR_ROWSPAN,value);
    00246     }
    00247 }
    00248
    00249 DOMString HTMLTableCellElement::scope() const
    00250 {
    00251     if(!impl) return DOMString();
    00252     return ((ElementImpl *)impl)->getAttribute(ATTR_SCOPE);
    00253 }
    00254
    00255 void HTMLTableCellElement::setScope( const DOMString &value )
    00256 {
    00257     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCOPE, value);
    00258 }
    00259
    00260 DOMString HTMLTableCellElement::vAlign() const
    00261 {
    00262     if(!impl) return DOMString();
    00263     return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
    00264 }
    00265
    00266 void HTMLTableCellElement::setVAlign( const DOMString &value )
    00267 {
    00268     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
    00269 }
    00270
    00271 DOMString HTMLTableCellElement::width() const
    00272 {
    00273     if(!impl) return DOMString();
    00274     return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00275 }
    00276
    00277 void HTMLTableCellElement::setWidth( const DOMString &value )
    00278 {
    00279     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00280 }
    00281
    00282 // --------------------------------------------------------------------------
    00283
    00284 HTMLTableColElement::HTMLTableColElement() : HTMLElement()
    00285 {
    00286 }
    00287
    00288 HTMLTableColElement::HTMLTableColElement(const HTMLTableColElement &other) : HTMLElement(other)
    00289 {
    00290 }
    00291
    00292 HTMLTableColElement::HTMLTableColElement(HTMLTableColElementImpl *impl) : HTMLElement(impl)
    00293 {
    00294 }
    00295
    00296 HTMLTableColElement &HTMLTableColElement::operator = (const Node &other)
    00297 {
    00298     if( other.elementId() != ID_COL &&
    00299     other.elementId() != ID_COLGROUP )
    00300     {
    00301     if ( impl ) impl->deref();
    00302     impl = 0;
    00303     } else {
    00304     Node::operator = (other);
    00305     }
    00306     return *this;
    00307 }
    00308
    00309 HTMLTableColElement &HTMLTableColElement::operator = (const HTMLTableColElement &other)
    00310 {
    00311     HTMLElement::operator = (other);
    00312     return *this;
    00313 }
    00314
    00315 HTMLTableColElement::~HTMLTableColElement()
    00316 {
    00317 }
    00318
    00319 DOMString HTMLTableColElement::align() const
    00320 {
    00321     if(!impl) return DOMString();
    00322     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00323 }
    00324
    00325 void HTMLTableColElement::setAlign( const DOMString &value )
    00326 {
    00327     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00328 }
    00329
    00330 DOMString HTMLTableColElement::ch() const
    00331 {
    00332     if(!impl) return DOMString();
    00333     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
    00334 }
    00335
    00336 void HTMLTableColElement::setCh( const DOMString &value )
    00337 {
    00338     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
    00339 }
    00340
    00341 DOMString HTMLTableColElement::chOff() const
    00342 {
    00343     if(!impl) return DOMString();
    00344     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
    00345 }
    00346
    00347 void HTMLTableColElement::setChOff( const DOMString &value )
    00348 {
    00349     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
    00350 }
    00351
    00352 long HTMLTableColElement::span() const
    00353 {
    00354     if(!impl) return 0;
    00355     return ((ElementImpl *)impl)->getAttribute(ATTR_SPAN).toInt();
    00356 }
    00357
    00358 void HTMLTableColElement::setSpan( long _span )
    00359 {
    00360     if(impl) {
    00361     DOMString value(QString::number(_span));
    00362         ((ElementImpl *)impl)->setAttribute(ATTR_SPAN,value);
    00363     }
    00364 }
    00365
    00366 DOMString HTMLTableColElement::vAlign() const
    00367 {
    00368     if(!impl) return DOMString();
    00369     return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
    00370 }
    00371
    00372 void HTMLTableColElement::setVAlign( const DOMString &value )
    00373 {
    00374     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
    00375 }
    00376
    00377 DOMString HTMLTableColElement::width() const
    00378 {
    00379     if(!impl) return DOMString();
    00380     return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00381 }
    00382
    00383 void HTMLTableColElement::setWidth( const DOMString &value )
    00384 {
    00385     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00386 }
    00387
    00388 // --------------------------------------------------------------------------
    00389
    00390 HTMLTableElement::HTMLTableElement() : HTMLElement()
    00391 {
    00392 }
    00393
    00394 HTMLTableElement::HTMLTableElement(const HTMLTableElement &other) : HTMLElement(other)
    00395 {
    00396 }
    00397
    00398 HTMLTableElement::HTMLTableElement(HTMLTableElementImpl *impl) : HTMLElement(impl)
    00399 {
    00400 }
    00401
    00402 HTMLTableElement &HTMLTableElement::operator = (const Node &other)
    00403 {
    00404     assignOther( other, ID_TABLE );
    00405     return *this;
    00406 }
    00407
    00408 HTMLTableElement &HTMLTableElement::operator = (const HTMLTableElement &other)
    00409 {
    00410     HTMLElement::operator = (other);
    00411     return *this;
    00412 }
    00413
    00414 HTMLTableElement::~HTMLTableElement()
    00415 {
    00416 }
    00417
    00418 HTMLTableCaptionElement HTMLTableElement::caption() const
    00419 {
    00420     if(!impl) return 0;
    00421     return ((HTMLTableElementImpl *)impl)->caption();
    00422 }
    00423
    00424 void HTMLTableElement::setCaption( const HTMLTableCaptionElement &_caption )
    00425 {
    00426     if(impl)
    00427         ((HTMLTableElementImpl *)impl)
    00428         ->setCaption( ((HTMLTableCaptionElementImpl *)_caption.impl) );
    00429 }
    00430
    00431 HTMLTableSectionElement HTMLTableElement::tHead() const
    00432 {
    00433     if(!impl) return 0;
    00434     return ((HTMLTableElementImpl *)impl)->tHead();
    00435 }
    00436
    00437 void HTMLTableElement::setTHead( const HTMLTableSectionElement &_tHead )
    00438 {
    00439
    00440     if(impl)
    00441         ((HTMLTableElementImpl *)impl)
    00442         ->setTHead( ((HTMLTableSectionElementImpl *)_tHead.impl) );
    00443 }
    00444
    00445 HTMLTableSectionElement HTMLTableElement::tFoot() const
    00446 {
    00447     if(!impl) return 0;
    00448     return ((HTMLTableElementImpl *)impl)->tFoot();
    00449 }
    00450
    00451 void HTMLTableElement::setTFoot( const HTMLTableSectionElement &_tFoot )
    00452 {
    00453
    00454     if(impl)
    00455         ((HTMLTableElementImpl *)impl)
    00456         ->setTFoot( ((HTMLTableSectionElementImpl *)_tFoot.impl) );
    00457 }
    00458
    00459 HTMLCollection HTMLTableElement::rows() const
    00460 {
    00461     if(!impl) return HTMLCollection();
    00462     return HTMLCollection(impl, HTMLCollectionImpl::TABLE_ROWS);
    00463 }
    00464
    00465 HTMLCollection HTMLTableElement::tBodies() const
    00466 {
    00467     if(!impl) return HTMLCollection();
    00468     return HTMLCollection(impl, HTMLCollectionImpl::TABLE_TBODIES);
    00469 }
    00470
    00471 DOMString HTMLTableElement::align() const
    00472 {
    00473     if(!impl) return DOMString();
    00474     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00475 }
    00476
    00477 void HTMLTableElement::setAlign( const DOMString &value )
    00478 {
    00479     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00480 }
    00481
    00482 DOMString HTMLTableElement::bgColor() const
    00483 {
    00484     if(!impl) return DOMString();
    00485     return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
    00486 }
    00487
    00488 void HTMLTableElement::setBgColor( const DOMString &value )
    00489 {
    00490     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
    00491 }
    00492
    00493 DOMString HTMLTableElement::border() const
    00494 {
    00495     if(!impl) return DOMString();
    00496     return ((ElementImpl *)impl)->getAttribute(ATTR_BORDER);
    00497 }
    00498
    00499 void HTMLTableElement::setBorder( const DOMString &value )
    00500 {
    00501     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BORDER, value);
    00502 }
    00503
    00504 DOMString HTMLTableElement::cellPadding() const
    00505 {
    00506     if(!impl) return DOMString();
    00507     return ((ElementImpl *)impl)->getAttribute(ATTR_CELLPADDING);
    00508 }
    00509
    00510 void HTMLTableElement::setCellPadding( const DOMString &value )
    00511 {
    00512     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLPADDING, value);
    00513 }
    00514
    00515 DOMString HTMLTableElement::cellSpacing() const
    00516 {
    00517     if(!impl) return DOMString();
    00518     return ((ElementImpl *)impl)->getAttribute(ATTR_CELLSPACING);
    00519 }
    00520
    00521 void HTMLTableElement::setCellSpacing( const DOMString &value )
    00522 {
    00523     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLSPACING, value);
    00524 }
    00525
    00526 DOMString HTMLTableElement::frame() const
    00527 {
    00528     if(!impl) return DOMString();
    00529     return ((ElementImpl *)impl)->getAttribute(ATTR_FRAME);
    00530 }
    00531
    00532 void HTMLTableElement::setFrame( const DOMString &value )
    00533 {
    00534     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAME, value);
    00535 }
    00536
    00537 DOMString HTMLTableElement::rules() const
    00538 {
    00539     if(!impl) return DOMString();
    00540     return ((ElementImpl *)impl)->getAttribute(ATTR_RULES);
    00541 }
    00542
    00543 void HTMLTableElement::setRules( const DOMString &value )
    00544 {
    00545     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_RULES, value);
    00546 }
    00547
    00548 DOMString HTMLTableElement::summary() const
    00549 {
    00550     if(!impl) return DOMString();
    00551     return ((ElementImpl *)impl)->getAttribute(ATTR_SUMMARY);
    00552 }
    00553
    00554 void HTMLTableElement::setSummary( const DOMString &value )
    00555 {
    00556     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SUMMARY, value);
    00557 }
    00558
    00559 DOMString HTMLTableElement::width() const
    00560 {
    00561     if(!impl) return DOMString();
    00562     return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00563 }
    00564
    00565 void HTMLTableElement::setWidth( const DOMString &value )
    00566 {
    00567     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00568 }
    00569
    00570 HTMLElement HTMLTableElement::createTHead(  )
    00571 {
    00572     if(!impl) return 0;
    00573     return ((HTMLTableElementImpl *)impl)->createTHead(  );
    00574 }
    00575
    00576 void HTMLTableElement::deleteTHead(  )
    00577 {
    00578     if(impl)
    00579         ((HTMLTableElementImpl *)impl)->deleteTHead(  );
    00580 }
    00581
    00582 HTMLElement HTMLTableElement::createTFoot(  )
    00583 {
    00584     if(!impl) return 0;
    00585     return ((HTMLTableElementImpl *)impl)->createTFoot(  );
    00586 }
    00587
    00588 void HTMLTableElement::deleteTFoot(  )
    00589 {
    00590     if(impl)
    00591         ((HTMLTableElementImpl *)impl)->deleteTFoot(  );
    00592 }
    00593
    00594 HTMLElement HTMLTableElement::createCaption(  )
    00595 {
    00596     if(!impl) return 0;
    00597     return ((HTMLTableElementImpl *)impl)->createCaption(  );
    00598 }
    00599
    00600 void HTMLTableElement::deleteCaption(  )
    00601 {
    00602     if(impl)
    00603         ((HTMLTableElementImpl *)impl)->deleteCaption(  );
    00604 }
    00605
    00606 HTMLElement HTMLTableElement::insertRow( long index )
    00607 {
    00608     if(!impl) return 0;
    00609     int exceptioncode = 0;
    00610     HTMLElementImpl* ret = ((HTMLTableElementImpl *)impl)->insertRow( index, exceptioncode );
    00611     if (exceptioncode)
    00612         throw DOMException(exceptioncode);
    00613     return ret;
    00614 }
    00615
    00616 void HTMLTableElement::deleteRow( long index )
    00617 {
    00618     int exceptioncode = 0;
    00619     if(impl)
    00620         ((HTMLTableElementImpl *)impl)->deleteRow( index, exceptioncode );
    00621     if (exceptioncode)
    00622         throw DOMException(exceptioncode);
    00623 }
    00624
    00625 // --------------------------------------------------------------------------
    00626
    00627 HTMLTableRowElement::HTMLTableRowElement() : HTMLElement()
    00628 {
    00629 }
    00630
    00631 HTMLTableRowElement::HTMLTableRowElement(const HTMLTableRowElement &other) : HTMLElement(other)
    00632 {
    00633 }
    00634
    00635 HTMLTableRowElement::HTMLTableRowElement(HTMLTableRowElementImpl *impl) : HTMLElement(impl)
    00636 {
    00637 }
    00638
    00639 HTMLTableRowElement &HTMLTableRowElement::operator = (const Node &other)
    00640 {
    00641     assignOther( other, ID_TR );
    00642     return *this;
    00643 }
    00644
    00645 HTMLTableRowElement &HTMLTableRowElement::operator = (const HTMLTableRowElement &other)
    00646 {
    00647     HTMLElement::operator = (other);
    00648     return *this;
    00649 }
    00650
    00651 HTMLTableRowElement::~HTMLTableRowElement()
    00652 {
    00653 }
    00654
    00655 long HTMLTableRowElement::rowIndex() const
    00656 {
    00657     if(!impl) return 0;
    00658     return ((HTMLTableRowElementImpl *)impl)->rowIndex();
    00659 }
    00660
    00661 void HTMLTableRowElement::setRowIndex( long /*_rowIndex*/ )
    00662 {
    00663     throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
    00664 }
    00665
    00666 long HTMLTableRowElement::sectionRowIndex() const
    00667 {
    00668     if(!impl) return 0;
    00669     return ((HTMLTableRowElementImpl *)impl)->sectionRowIndex();
    00670 }
    00671
    00672 void HTMLTableRowElement::setSectionRowIndex( long /*_sectionRowIndex*/ )
    00673 {
    00674     throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
    00675 }
    00676
    00677 HTMLCollection HTMLTableRowElement::cells() const
    00678 {
    00679     if(!impl) return HTMLCollection();
    00680     return HTMLCollection(impl, HTMLCollectionImpl::TR_CELLS);
    00681 }
    00682
    00683 void HTMLTableRowElement::setCells( const HTMLCollection & /*_cells*/ )
    00684 {
    00685     throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
    00686 }
    00687
    00688 DOMString HTMLTableRowElement::align() const
    00689 {
    00690     if(!impl) return DOMString();
    00691     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00692 }
    00693
    00694 void HTMLTableRowElement::setAlign( const DOMString &value )
    00695 {
    00696     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00697 }
    00698
    00699 DOMString HTMLTableRowElement::bgColor() const
    00700 {
    00701     if(!impl) return DOMString();
    00702     return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
    00703 }
    00704
    00705 void HTMLTableRowElement::setBgColor( const DOMString &value )
    00706 {
    00707     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
    00708 }
    00709
    00710 DOMString HTMLTableRowElement::ch() const
    00711 {
    00712     if(!impl) return DOMString();
    00713     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
    00714 }
    00715
    00716 void HTMLTableRowElement::setCh( const DOMString &value )
    00717 {
    00718     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
    00719 }
    00720
    00721 DOMString HTMLTableRowElement::chOff() const
    00722 {
    00723     if(!impl) return DOMString();
    00724     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
    00725 }
    00726
    00727 void HTMLTableRowElement::setChOff( const DOMString &value )
    00728 {
    00729     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
    00730 }
    00731
    00732 DOMString HTMLTableRowElement::vAlign() const
    00733 {
    00734     if(!impl) return DOMString();
    00735     return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
    00736 }
    00737
    00738 void HTMLTableRowElement::setVAlign( const DOMString &value )
    00739 {
    00740     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
    00741 }
    00742
    00743 HTMLElement HTMLTableRowElement::insertCell( long index )
    00744 {
    00745     if(!impl) return 0;
    00746     int exceptioncode = 0;
    00747     HTMLElementImpl* ret = ((HTMLTableRowElementImpl *)impl)->insertCell( index, exceptioncode );
    00748     if (exceptioncode)
    00749         throw DOMException(exceptioncode);
    00750     return ret;
    00751 }
    00752
    00753 void HTMLTableRowElement::deleteCell( long index )
    00754 {
    00755     int exceptioncode = 0;
    00756     if(impl)
    00757         ((HTMLTableRowElementImpl *)impl)->deleteCell( index, exceptioncode );
    00758     if (exceptioncode)
    00759         throw DOMException(exceptioncode);
    00760 }
    00761
    00762 // --------------------------------------------------------------------------
    00763
    00764 HTMLTableSectionElement::HTMLTableSectionElement() : HTMLElement()
    00765 {
    00766 }
    00767
    00768 HTMLTableSectionElement::HTMLTableSectionElement(const HTMLTableSectionElement &other) : HTMLElement(other)
    00769 {
    00770 }
    00771
    00772 HTMLTableSectionElement::HTMLTableSectionElement(HTMLTableSectionElementImpl *impl) : HTMLElement(impl)
    00773 {
    00774 }
    00775
    00776 HTMLTableSectionElement &HTMLTableSectionElement::operator = (const Node &other)
    00777 {
    00778     if(other.elementId() != ID_TBODY &&
    00779        other.elementId() != ID_THEAD &&
    00780        other.elementId() != ID_TFOOT )
    00781     {
    00782     if ( impl ) impl->deref();
    00783     impl = 0;
    00784     } else {
    00785     Node::operator = (other);
    00786     }
    00787     return *this;
    00788 }
    00789
    00790 HTMLTableSectionElement &HTMLTableSectionElement::operator = (const HTMLTableSectionElement &other)
    00791 {
    00792     HTMLElement::operator = (other);
    00793     return *this;
    00794 }
    00795
    00796 HTMLTableSectionElement::~HTMLTableSectionElement()
    00797 {
    00798 }
    00799
    00800 DOMString HTMLTableSectionElement::align() const
    00801 {
    00802     if(!impl) return DOMString();
    00803     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00804 }
    00805
    00806 void HTMLTableSectionElement::setAlign( const DOMString &value )
    00807 {
    00808     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00809 }
    00810
    00811 DOMString HTMLTableSectionElement::ch() const
    00812 {
    00813     if(!impl) return DOMString();
    00814     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
    00815 }
    00816
    00817 void HTMLTableSectionElement::setCh( const DOMString &value )
    00818 {
    00819     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
    00820 }
    00821
    00822 DOMString HTMLTableSectionElement::chOff() const
    00823 {
    00824     if(!impl) return DOMString();
    00825     return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
    00826 }
    00827
    00828 void HTMLTableSectionElement::setChOff( const DOMString &value )
    00829 {
    00830     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
    00831 }
    00832
    00833 DOMString HTMLTableSectionElement::vAlign() const
    00834 {
    00835     if(!impl) return DOMString();
    00836     return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
    00837 }
    00838
    00839 void HTMLTableSectionElement::setVAlign( const DOMString &value )
    00840 {
    00841     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
    00842 }
    00843
    00844 HTMLCollection HTMLTableSectionElement::rows() const
    00845 {
    00846     if(!impl) return HTMLCollection();
    00847     return HTMLCollection(impl, HTMLCollectionImpl::TABLE_ROWS);
    00848 }
    00849
    00850 HTMLElement HTMLTableSectionElement::insertRow( long index )
    00851 {
    00852     if(!impl) return 0;
    00853     int exceptioncode = 0;
    00854     HTMLElementImpl* ret = ((HTMLTableSectionElementImpl *)impl)->insertRow( index, exceptioncode );
    00855     if (exceptioncode)
    00856         throw DOMException(exceptioncode);
    00857     return ret;
    00858 }
    00859
    00860 void HTMLTableSectionElement::deleteRow( long index )
    00861 {
    00862     int exceptioncode = 0;
    00863     if(impl)
    00864         ((HTMLTableSectionElementImpl *)impl)->deleteRow( index, exceptioncode );
    00865     if (exceptioncode)
    00866         throw DOMException(exceptioncode);
    00867 }
    00868

This file is part of the documentation for khtml Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:33:11 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003