html_table.cpp Source File (khtml Library)

| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# html_table.cpp

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

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:33:58 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001