=encoding euc-jp =head1 ̾Á° HTML::Table - HTML ¥Æ¡¼¥Ö¥ë¤òÀ¸À®¤¹¤ë =head1 ³µÍ× use HTML::Table; $table1 = new HTML::Table($rows, $cols); ¤Þ¤¿¤Ï¡¢ $table1 = new HTML::Table(-rows=>26, -cols=>2, -align=>'center', -rules=>'rows', -border=>0, -bgcolor=>'blue', -width=>'50%', -spacing=>0, -padding=>0, -style=>'color: blue', -class=>'myclass', -head=> ['head1', 'head2'], -data=> [ ['1:1', '1:2'], ['2:1', '2:2'] ] ); ¤Þ¤¿¤Ï¡¢ $table1 = new HTML::Table( [ ['1:1', '1:2'], ['2:1', '2:2'] ] ); $table1->setCell($cellrow, $cellcol, 'This is Cell 1'); $table1->setCellBGColor('blue'); $table1->setCellColSpan(1, 1, 2); $table1->setRowHead(1); $table1->setColHead(1); $table1->print; $table2 = new HTML::Table; $table2->addRow(@cell_values); $table2->addCol(@cell_values2); $table1->setCell(1,1, "$table2->getTable"); $table1->print; =head1 Æ°ºî¾ò·ï Perl5.002 =head1 ¥¨¥¯¥¹¥Ý¡¼¥È ¤Ê¤· =head1 ÀâÌÀ HTML::Table ¤Ï¡¢CGI ¥¹¥¯¥ê¥×¥È¤Ë¤ª¤¤¤Æ HTML ¥Æ¡¼¥Ö¥ë¤òºîÀ®¤¹¤ë¤¿¤á¤Ë»È¤¤¤Þ¤¹¡£Ä󶡤µ¤ì¤ë¥á¥½¥Ã¥É·²¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¡¢Èó¾ï¤ËÊ£»¨¤Ê¥Æ¡¼¥Ö¥ë¤ÎÀ¸À®¡¢Áàºî¡¢¤½¤·¤Æ½ÐÎϤ¬ Perl ¥¹¥¯¥ê¥×¥È¤Ç²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£¤³¤Î¥â¥¸¥å¡¼¥ë¤Ç¤Ï¡¢¥Æ¡¼¥Ö¥ëÃæ¤Ë¥Æ¡¼¥Ö¥ë¤òºîÀ®¤¹¤ëºî¶È¤â Perl ¤«¤éÈó¾ï¤Ë´Êñ¤Ë¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£HTML ¥¿¥°¤ò»ÈÍѤ¹¤ë¤³¤È¤Ê¤¯¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤ÇÄ󶡤µ¤ì¤ë¥á¥½¥Ã¥É·²¤ò»ÈÍѤ¹¤ë¤À¤±¤ÇÁ´¤Æ¤Îµ¡Ç½¤òÈ÷¤¨¤ë¥Æ¡¼¥Ö¥ë¤òÀ¸À®¤¹¤ë¤³¤È¤¬²Äǽ¤Ç¤¹¡£ HTML::Table ¤Ï¡¢addRow ¤È addCol ¥á¥½¥Ã¥É¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¡¢Æ°Åª¤Ë¥µ¥¤¥º¤ÎÊѤï¤ë¥Æ¡¼¥Ö¥ë¤òºîÀ®¤¹¤ë¤³¤È¤â½ÐÍè¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢¤½¤Î¤È¤­¤Î¥Æ¡¼¥Ö¥ë¥»¥ë¿ô¤òĶ¤¨¤ëÃͤ¬ÅϤµ¤ì¤¿¾ì¹ç¤Ë¡¢¤³¤ì¤é¥á¥½¥Ã¥É¤Ï¤½¤ì¤ËŬ¹ç¤¹¤ë¤è¤¦¼«Æ°Åª¤Ë¥Æ¡¼¥Ö¥ë¤ò¥ê¥µ¥¤¥º¤·¤Þ¤¹¡£ HTML 3.0 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¥Æ¡¼¥Ö¥ë¤Ë´Ø¤¹¤ë¤Û¤È¤ó¤ÉÁ´¤Æ¤Î¥¿¥°·²¤Ë¤Ä¤¤¤Æ¡¢Âбþ¤¹¤ë¥á¥½¥Ã¥É¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ ¤³¤Îʸ¾Ï¤ÎÆüËܸìÌõ¤Ï¼¡¤ÇÍøÍѤǤ­¤Þ¤¹¡§ http://member.nifty.ne.jp/hippo2000/perltips/html/table.htm ¡ÊÌõ¼Ô(2)Äɵ­¡¨¤³¤Î¥Ú¡¼¥¸¤Ï¡¢¼¡¤Ë°ÜÆ°¤µ¤ì¤Æ¤ª¤ê¤Þ¤¹ http://homepage3.nifty.com/hippo2000/perltips/html/table.htm¡Ë =head1 ¥á¥½¥Ã¥É·² ³Ñ¤«¤Ã¤³ [ ] ¤Ï¡¢¥ª¥×¥·¥ç¥ó¤Î¥Ñ¥é¥á¡¼¥¿¤Ç¤¢¤ë¤³¤È¤ò¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£»ØÄꤵ¤ì¤Ê¤¤¾ì¹ç¤Ï¥Ç¥Õ¥©¥ë¥ÈÃͤ¬»È¤ï¤ì¤Þ¤¹¡£ row_num ¤Ï¡¢¹Ô¿ô¤¬É¬¿Ü¤Ç¤¢¤ë¤³¤È¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£¹Ô¤Ï1¤«¤é¿ô¤¨¤Þ¤¹¡£ºÇ¸å¤Î¹Ô¤ò»²¾È¤¹¤ë¤Ë¤Ï¡¢-1¤ò»ÈÍѤ·¤Þ¤¹¡£ col_num ¤Ï¡¢Îó¿ô¤¬É¬¿Ü¤Ç¤¢¤ë¤³¤È¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£Îó¤Ï1¤«¤é¿ô¤¨¤Þ¤¹¡£ºÇ¸å¤ÎÎó¤ò»²¾È¤¹¤ë¤Ë¤Ï¡¢-1¤ò»ÈÍѤ·¤Þ¤¹¡£ =head2 À¸À® =over 4 =item new HTML::Table([num_rows, num_cols]) ¿·¤·¤¤HTML ¥Æ¡¼¥Ö¥ë ¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Þ¤¹¡£¹Ô¿ô¤ÈÎó¿ô¤¬»ØÄꤵ¤ì¤ì¤Ð¡¢¥Æ¡¼¥Ö¥ë¤Ï¤½¤Î¥µ¥¤¥º¤Ç½é´ü²½¤µ¤ì¤Þ¤¹¡£¹Ô¤ÈÎó¤Î¿ô¤Ï 1, 1 ¤«¤é»Ï¤Þ¤ê¤Þ¤¹¡£0, 0 ¤Ï¡¢¶õ¤Î¥Æ¡¼¥Ö¥ë¤È²ò¼á¤µ¤ì¤Þ¤¹¡£ =item new HTML::Table([ -rows=>num_rows, -cols=>num_cols, -border=>border_width, -align=>table_alignment, -style=>table_style, -class=>table_class, -bgcolor=>back_colour, -width=>table_width, -spacing=>cell_spacing, -padding=>cell_padding ]) ¿·¤·¤¤HTML ¥Æ¡¼¥Ö¥ë ¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Þ¤¹¡£¹Ô¿ô¤ÈÎó¿ô¤¬»ØÄꤵ¤ì¤ì¤Ð¡¢¥Æ¡¼¥Ö¥ë¤Ï¤½¤Î¥µ¥¤¥º¤Ç½é´ü²½¤µ¤ì¤Þ¤¹¡£¹Ô¤ÈÎó¤Î¿ô¤Ï 1, 1 ¤«¤é»Ï¤Þ¤ê¤Þ¤¹¡£0, 0 ¤Ï¡¢¶õ¤Î¥Æ¡¼¥Ö¥ë¤È²ò¼á¤µ¤ì¤Þ¤¹¡£ ¡ÊÌõ¼Ô(2)Äɵ­¡§¼Ø­¤Ç¤¹¤¬¡¢°ú¿ô¤ÎÌõ¤âÉÕ¤±¤Þ¤¹¡¨ -row => ¡ÊÎó¤Î¿ô¡Ë -cols => ¡Ê¹Ô¤Î¿ô¡Ë -border=> ¡ÊÏȤÎÂÀ¤µ¡Ë -align=> ¡Ê¥Æ¡¼¥Ö¥ë¼«ÂΤοåʿɽ¼¨°ÌÃÖ¡Ë -style=> ¡Ê¥¹¥¿¥¤¥ë¡Ë -class=> ¡Ê¥¯¥é¥¹¡Ë -bgcolor=> ¡ÊÇØ·Ê¿§¡Ë -width=> ¡Ê¥Æ¡¼¥Ö¥ë¤ÎÉý¡Ë -spacing=> ¡Ê¥»¥ëƱ»Î¤Î´Ö³Ö¡Ë -padding=> ¡Ê¥»¥ëÆâ¤Î;Çò¡Ë ¡Ë =back =head2 ¥Æ¡¼¥Ö¥ë¤Ë´Ø¤¹¤ë¥á¥½¥Ã¥É·² =over 4 =item setBorder([pixels]) ¥Æ¡¼¥Ö¥ëÏȤÎÂÀ¤µ¤òÀßÄꤷ¤Þ¤¹¡£ =item setWidth([pixels|percentofscreen]) ¥Æ¡¼¥Ö¥ë¤ÎÉý¤òÀßÄꤷ¤Þ¤¹¡£ $table->setWidth(500); ¤Þ¤¿¤Ï¡¢ $table->setWidth('100%'); =item setCellSpacing([pixels]) ¥Æ¡¼¥Ö¥ëÆ⥻¥ëƱ»Î¤Î´Ö³Ö¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellPadding([pixels]) ¥»¥ëÆâ¤Î;Çò¤òÀßÄꤷ¤Þ¤¹¡£ =item setCaption("CaptionText" [, TOP|BOTTOM]) ¥Æ¡¼¥Ö¥ë¤Î¸«½Ð¤·¤òÀßÄꤷ¤Þ¤¹¡£ =item setBGColor([colorname|colortriplet]) ¥Æ¡¼¥Ö¥ë¤ÎÇØ·Ê¿§¤òÀßÄꤷ¤Þ¤¹¡£ =item autoGrow([1|true|on|anything|0|false|off|no|disable]) setCell ¤ÇÅϤµ¤ì¤¿¹Ô¿ô¤Þ¤¿¤ÏÎó¿ô¤¬¸½ºß¤Î¥Æ¡¼¥Ö¥ë¥µ¥¤¥º¤òĶ¤¨¤ë»þ¤Ë¡¢¥Æ¡¼¥Ö¥ë¤ò¼«Æ°Åª¤Ë³È¤²¤ëµ¡Ç½¤ò»ÈÍѤ¹¤ë¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡¿»ÈÍѤ·¤Ê¤¤¤ÈÀÚ¤êÂؤ¨¤Þ¤¹¡£ =item setAlign ( [ LEFT , CENTER , RIGHT ] ) ¥Æ¡¼¥Ö¥ë¤Î¿åÊ¿Êý¸þɽ¼¨°ÌÃÖ¤òÀßÄꤷ¤Þ¤¹¡£ =item setRules ( [ ROWS , COLS , ALL, BOTH , GROUPS ] ) ¥Æ¡¼¥Ö¥ëÆâÏȤÎ̵ͭ¤òÀßÄꤷ¤Þ¤¹¡£ =item setStyle ( 'css style' ) ¥Æ¡¼¥Ö¥ë¤Î¥¹¥¿¥¤¥ë°À­¤òÀßÄꤷ¤Þ¤¹¡£ =item setClass ( 'css class' ) ¥Æ¡¼¥Ö¥ë¤Î¥¯¥é¥¹Â°À­¤òÀßÄꤷ¤Þ¤¹¡£ =item setAttr ( 'user attribute' ) ¥Æ¡¼¥Ö¥ë¤Ë¡¢¥æ¡¼¥¶¡¼ÄêµÁ¤Î°À­¤òÀßÄꤷ¤Þ¤¹¡£HTML::Table ¤Ç̤¤ÀÄ󶡤µ¤ì¤Æ¤¤¤Ê¤¤Æüì¤Ê°À­¤òÀßÄꤹ¤ë¤Î¤ËÍøÍѤǤ­¤Þ¤¹¡£ =item sort ( [sort_col_num, sort_type, sort_order, num_rows_to_skip] ) ¤Þ¤¿¤Ï sort( -sort_col => sort_col_num, -sort_type => sort_type, -sort_order => sort_order, -skip_rows => num_rows_to_skip, -strip_html => strip_html, -strip_non_numeric => strip_non_numeric, -presort_func => €&filter_func ) sort_type ¤Ï¡¢ { ALPHA | NUMERIC }¤Ç»ØÄê¡Ê¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¡¿¿ô»ú½ç¡Ë¡¢ sort_order ¤Ï¡¢ { ASC | DESC }¤Ç»ØÄê¡Ê¾º½ç¡¿¹ß½ç¡Ë¡¢ strip_html ¤Ï¡¢ { 0 | 1 }¤Ç»ØÄê¡Ê¥Ç¥Õ¥©¥ë¥È¤Ï1¡Ë strip_non_numeric ¤Ï¡¢ { 0 | 1 },¡Ê¥Ç¥Õ¥©¥ë¥È¤Ï1¡Ë »ØÄꤵ¤ì¤¿¹Ô¤ÇÁ´¤Æ¤ÎÎó¤ò¥½¡¼¥È¤·¤Þ¤¹¡Ê¥ª¥×¥·¥ç¥ó¤È¤·¤Æ¡¢ num_rows_to_skip ¤Ç»ØÄꤵ¤ì¤¿¥Æ¡¼¥Ö¥ëÀèƬÎó¤Þ¤Ç¤Ï¥¹¥­¥Ã¥×¤µ¤ì¤Þ¤¹¡Ë¡£ ¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî¤È¤·¤Æ¥½¡¼¥È¤Ç¤ÏHTML¥¿¥°¤È ¤ò̵»ë¤·¤Þ¤¹¤¬¡¢ strip_html ¥Ñ¥é¥á¡¼¥¿¡¼¤ò0¤Ë¤¹¤ë¤³¤È¤Ç¤³¤ÎÆ°ºî¤Ï̵¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ ¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî¤È¤·¤Æ¿ôÃͤÎÂç¾®¤Ç¤Î¥½¡¼¥È¤Ï¿ô»ú°Ê³°¤Îʸ»ú¤ò̵»ë¤·¤Þ¤¹¤¬¡¢ strip_non_numeric ¥Ñ¥é¥á¡¼¥¿¡¼¤ò0¤Ë¤¹¤ë¤³¤È¤Ç¤³¤ÎÆ°ºî¤Ï̵¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ ¥½¡¼¥ÈÁ°¤Ë´Ø¿ô¤òŬÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¡¢Î㤨¤ÐÆüÉÕÅù¤Ç¥½¡¼¥È¤¹¤ëÁ°¤Ë¥»¥ëÆâÍƤÎÁ°½èÍý¤ò¤¹¤ë¾ì¹ç¤ËÍøÍѤǤ­¤Þ¤¹¡£ =item getTableRows ¥Æ¡¼¥Ö¥ë¤Î¹Ô¿ô¤òÊÖ¤·¤Þ¤¹¡£ =item getTableCols ¥Æ¡¼¥Ö¥ë¤ÎÎó¿ô¤òÊÖ¤·¤Þ¤¹¡£ =back =head2 ¥»¥ë¤Ë´Ø¤¹¤ë¥á¥½¥Ã¥É·² =over 4 =item setCell(row_num, col_num, "content") ¥»¥ë¤ÎÆâÍƤòÀßÄꤷ¤Þ¤¹¡£¤³¤Î¤³¤È¤Ë¤ÏǤ°Õ¤Îʸ»úÎó¡¢ getTable ¥á¥½¥Ã¥É·Ðͳ¤Ç¾¤Î¥Æ¡¼¥Ö¥ë¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¤é¤â¡¢²Äǽ¤Ç¤¹¡£»ØÄꤷ¤¿¹Ô¡¦Î󤬥ơ¼¥Ö¥ë¶­³¦¤ò±Û¤¨¤Æ¤¤¤ë¾ì¹ç¡¢¼«Æ°Åª¤Ë¹Ô¡¦Î󤬳Ȥ²¤é¤ì¤Þ¤¹¡£ =item setCellAlign(row_num, col_num, [CENTER|RIGHT|LEFT]) ¥»¥ëÆâÍƤοåÊ¿°ÌÃÖ¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellVAlign(row_num, col_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE]) ¥»¥ëÆâÍƤοâľ°ÌÃÖ¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellWidth(row_num, col_num, [pixels|percentoftable]) ¥»¥ë¤ÎÉý¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellHeight(row_num, col_num, [pixels]) ¥»¥ë¤Î¹â¤µ¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellHead(row_num, col_num) ¥»¥ë¤ò¸«½Ð¤·¹àÌܤˤ·¤Þ¤¹¡Ê¤¹¤Ê¤ï¤Á¡¢¥¿¥°¡Ë¡£ =item setCellNoWrap(row_num, col_num, [0|1]) ¥»¥ëÆâʸ»ú¤Î²þ¹Ô¤ò¶Ø»ß¤·¤Þ¤¹¡£ =item setCellBGColor(row_num, col_num, [colorname|colortriplet]) ¥»¥ë¤ÎÇØ·Ê¿§¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellRowSpan(row_num, col_num, num_cells) ²¼Êý¸þ¤Ø·ë¹ç¤·¤¿¥»¥ë¤Ë¤·¤Þ¤¹¡£»ØÄꤷ¤¿¥»¥ë°Ê²¼¤Î¥»¥ë¿ô¤ÈÈæ¤Ù¤Æ¡¢·ë¹ç¤¹¤ë¿ô¤¬Â礭¤¤¾ì¹ç¤Ë¤Ï¡¢´Ö°ã¤Ã¤¿Ãͤ¬ÊÖ¤µ¤ì¤Þ¤¹¡ÊÌõ¼Ô(2)Äɵ­¡§»ä¤Î´Ä¶­¤Ç¤Ï¡¢num_cells¤ÎÃͤޤǥơ¼¥Ö¥ë¤ò³ÈÄ¥¤··ë¹ç¥»¥ë¤òºî¤ê¤Þ¤·¤¿¡Ë¡£ =item setCellColSpan(row_num, col_num, num_cells) ±¦Êý¸þ¤Ø·ë¹ç¤·¤¿¥»¥ë¤Ë¤·¤Þ¤¹¡£»ØÄꤷ¤¿¥»¥ë±¦Â¦¤Î¥»¥ë¿ô¤ÈÈæ¤Ù¤Æ¡¢·ë¹ç¤¹¤ë¿ô¤¬Â礭¤¤¾ì¹ç¤Ë¤Ï¡¢´Ö°ã¤Ã¤¿Ãͤ¬ÊÖ¤µ¤ì¤Þ¤¹¡ÊƱ¾å¡Ë¡£ =item setCellSpan(row_num, col_num, num_rows, num_cols) »ØÄꥻ¥ë¤ò´ðÅÀ¤È¤·¤¿¥»¥ë¥Ö¥í¥Ã¥¯¤ò·ë¹ç¤·¤Þ¤¹¡£·ë¹ç¤¹¤ëÈÏ°Ï¤Ï num_cols ¤ÎÉý¡¢ num_rows ¤Î¿¼¤µ¤Ç¤¹¡£ =item setCellFormat(row_num, col_num, start_string, end_string) Start_string ¤ÏÍ­¸ú¤ÊHTML¥¿¥°Ê¸»úÎó¤Ç¤¢¤ë¤Ù¤­¤Ç¡¢¤½¤ì¤¬¥»¥ëÆâÍƤÎÁ°¤Ë½ÐÎϤµ¤ì¤Þ¤¹¡£Æ±ÍÍ¤Ë end_string ¤ÏÍ­¸ú¤ÊHTML¥¿¥°Ê¸»úÎó¤Ç¡¢¥»¥ëÆâÍƤθå¤í¤Ë½ÐÎϤµ¤ì¤Þ¤¹¡£¤³¤Î¤³¤È¤Ë¤è¤ê¡¢¥»¥ëÆâÍƤΥե©¡¼¥Þ¥Ã¥È¤¬²Äǽ¤È¤Ê¤ê¤Þ¤¹¡£ $table->setCellFormat(1, 2, '', ''); =item setCellStyle (row_num, col_num, 'css style') ¥»¥ë¤Î¥¹¥¿¥¤¥ë°À­¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellClass (row_num, col_num, 'css class') ¥»¥ë¤Î¥¯¥é¥¹Â°À­¤òÀßÄꤷ¤Þ¤¹¡£ =item setCellAttr (row_num, col_num, 'user attribute') ¥»¥ë¤Ë¥æ¡¼¥¶¡¼ÄêµÁ¤Î°À­¤òÀßÄꤷ¤Þ¤¹¡£HTML::Table ¤¬Ì¤¤ÀÄ󶡤·¤Æ¤¤¤Ê¤¤Æüì¤Ê°À­¤òÀßÄꤹ¤ë¤Î¤ËÍøÍѤǤ­¤Þ¤¹¡£ =item setLastCell* Á´¤Æ¤Î setCell ¥á¥½¥Ã¥É·²¤Ï¡¢¤½¤ì¤é¤ËÂбþ¤¹¤ë setLastCell ¥á¥½¥Ã¥É¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤Î setLastCell ¥á¥½¥Ã¥É¤Ï row_num ¤È col_num ¥Ñ¥é¥á¡¼¥¿¤ò¼õ¤±¼è¤é¤º¡¢¼«Æ°Åª¤ËºÇ¸åÎ󤫤ĺǸå¹Ô¤Î¥»¥ë¤Ø¥á¥½¥Ã¥É¤òŬÍѤ·¤Þ¤¹¡£ ¡ÊÌõ¼Ô(2)Äɵ­¡§²¼¼ê¤ÊÌõ¤è¤ê¡¢°Ê²¼¤ÎÎã¤ÎÊý¤¬Ê¬¤«¤ê¤ä¤¹¤¤¤«¤È»×¤¤¤Þ¤¹¡¨ my $t = new HTML::Table(3,3); $t -> setLastCell ('lastCell'); $t -> setLastCellBGColor ('#66cc66'); ¼¡¤ÈƱ¤¸¤Ç¤¹... my $t = new HTML::Table(3,3); $t -> setCell ('-1', '-1', 'lastCell'); $t -> setCellBGColor ('-1', '-1', '#66cc66'); ¡Ë =item getCell(row_num, col_num) »ØÄꤵ¤ì¤¿¥»¥ëÆâÍƤòʸ»úÎó¤È¤·¤ÆÊÖ¤·¤Þ¤¹¡£ =back =head2 ¹Ô¤Ë´Ø¤¹¤ë¥á¥½¥Ã¥É·² =over 4 =item addCol("cell 1 content" [, "cell 2 content", ...]) ¹Ô¤ò¥Æ¡¼¥Ö¥ë¤Î±¦Ã¼¤Ë²Ã¤¨¤Þ¤¹¡£Îó¤Î¿ô¤è¤ê¤â¿¤¯¤ÎÃͤòÅϤ¹¤È¡¢Îó¤òÁý¤ä¤½¤¦¤È¤·¤Æ¤¤¤ë¤È²ò¼á¤µ¤ì¤Þ¤¹¡£ =item setColAlign(col_num, [CENTER|RIGHT|LEFT]) ¹Ô¤Ë setCellAlign ¤òŬÍѤ·¤Þ¤¹¡£ =item setColVAlign(col_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE]) ¹Ô¤Ë setCellVAlign ¤òŬÍѤ·¤Þ¤¹¡£ =item setColWidth(col_num, [pixels|percentoftable]) ¹Ô¤Ë setCellWidth ¤òŬÍѤ·¤Þ¤¹¡£ =item setColHeight(col_num, [pixels]) ¹Ô¤Ë setCellHeight ¤òŬÍѤ·¤Þ¤¹¡£ =item setColHead(col_num) ¹Ô¤Ë setCellHead ¤òŬÍѤ·¤Þ¤¹¡£ =item setColNoWrap(col_num, [0|1]) ¹Ô¤Ë setCellNoWrap ¤òŬÍѤ·¤Þ¤¹¡£ =item setColBGColor(row_num, [colorname|colortriplet]) ¹Ô¤Ë setCellBGColor ¤òŬÍѤ·¤Þ¤¹¡£ =item setColFormat(col_num, start_string, end_sting) ¹Ô¤Ë setCellFormat ¤òŬÍѤ·¤Þ¤¹¡£ =item setColStyle (col_num, 'css style') ¹Ô¤Ë setCellStyle ¤òŬÍѤ·¤Þ¤¹¡£ =item setColClass (col_num, 'css class') ¹Ô¤Ë setCellClass ¤òŬÍѤ·¤Þ¤¹¡£ =item setColAttr (col_num, 'user attribute') ¹Ô¤Ë setCellAttr ¤òŬÍѤ·¤Þ¤¹¡£ =item setLastCol* Á´¤Æ¤Î setCol ¥á¥½¥Ã¥É·²¤Ï¡¢¤½¤ì¤é¤ØÂбþ¤¹¤ë setLastCol ¥á¥½¥Ã¥É¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤Î setLastCol ¥á¥½¥Ã¥É¤Ï col_num ¥Ñ¥é¥á¡¼¥¿¤ò¼õ¤±¼è¤é¤º¡¢¼«Æ°Åª¤ËºÇ¸å¹Ô¤Ø¥á¥½¥Ã¥É¤òŬÍѤ·¤Þ¤¹¡£¡ÊÌõ¼Ô(2)Äɵ­¡¨setLastCell*¤ÈƱÍÍ¡Ë =back =head2 Îó¤Ë´Ø¤¹¤ë¥á¥½¥Ã¥É =over 4 =item addRow("cell 1 content" [, "cell 2 content", ...]) Îó¤ò¥Æ¡¼¥Ö¥ë¤ÎºÇ²¼Éô¤Ë²Ã¤¨¤Þ¤¹¡£¹Ô¤Î¿ô¤è¤ê¤â¿¤¯¤ÎÃͤòÅϤ¹¤È¡¢¹Ô¤òÁý¤ä¤½¤¦¤È¤·¤Æ¤¤¤ë¤È²ò¼á¤µ¤ì¤Þ¤¹¡£ =item setRowAlign(row_num, [CENTER|RIGHT|LEFT]) Îó¤Ë setCellAttr ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowVAlign(row_num, [CENTER|TOP|BOTTOM|MIDDLE|BASELINE]) Îó¤Ë setCellVAlign ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowWidth(row_num, [pixels|percentoftable]) Îó¤Ë setCellWidth ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowHeight(row_num, [pixels]) Îó¤Ë setCellHeight ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowHead(row_num) Îó¤Ë setCellHead ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowNoWrap(col_num, [0|1]) Îó¤Ë setCellNoWrap ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowBGColor(row_num, [colorname|colortriplet]) Îó¤Ë setCellBGColor ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowFormat(row_num, start_string, end_string) Îó¤Ë setCellFormat ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowStyle (row_num, 'css style') Îó¤Ë setCellStyle ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowClass (row_num, 'css class') Îó¤Ë setCellClass ¤òŬÍѤ·¤Þ¤¹¡£ =item setRowAttr (row_num, 'user attribute') Îó¤Ë setCellAttr ¤òŬÍѤ·¤Þ¤¹¡£ =item setLastRow* Á´¤Æ¤Î setRow ¥á¥½¥Ã¥É·²¤Ï¡¢¤½¤ì¤é¤ØÂбþ¤¹¤ë setLastRow ¥á¥½¥Ã¥É¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤Î setLastRow ¥á¥½¥Ã¥É¤Ï row_num ¥Ñ¥é¥á¡¼¥¿¤ò¼õ¤±¼è¤é¤º¡¢¼«Æ°Åª¤ËºÇ¸åÎó¤Ø¥á¥½¥Ã¥É¤òŬÍѤ·¤Þ¤¹¡£¡ÊÌõ¼Ô(2)Äɵ­¡¨setLastCell*¤ÈƱÍÍ¡Ë =back =head2 ½ÐÎϤΥ᥽¥Ã¥É·² =over 4 =item getTable ¥Æ¡¼¥Ö¥ë¤ÎHTMLɽµ­¤ò´Þ¤àÆâÍƤò¡¢Ê¸»úÎó¤ÇÊÖ¤·¤Þ¤¹¡£ ʸ»úÎó¥¹¥«¥é¡¼¥³¥ó¥Æ¥­¥¹¥È¤Ç¥ª¥Ö¥¸¥§¥¯¥È¥ê¥Õ¥¡¥ì¥ó¥¹¤òÍѤ¤¤ë¤È¡¢Æ±¤¸¸ú²Ì¤¬ÆÀ¤é¤ì¤Þ¤¹¡£ Îã.... ¤³¤Î¥³¡¼¥ÉÃÇÊҤϡ¨ $table = new HTML::Table(2, 2); print '

Start

'; print $table->getTable; print '

End

'; °Ê²¼¤ÈƱÍͤνÐÎϤòÀ¸À®¤·¤Þ¤¹¡¨ $table = new HTML::Table(2, 2); print "

Start

$table

End

"; =item print ¥Æ¡¼¥Ö¥ë¤ÎHTMLɽµ­¤ò¡¢ STDOUT ¤Ë½ÐÎϤ·¤Þ¤¹¡£ =back =head1 ¥¯¥é¥¹ÊÑ¿ô =head1 HISTORY Îò»Ë This module was originally created in 1997 by Stacy Lacy and whose last version was uploaded to CPAN in 1998. The module was adopted in July 2000 by Anthony Peacock in order to distribute a revised version. This adoption took place without the explicit consent of Stacy Lacy as it proved impossible to contact them at the time. Explicit consent for the adoption has since been received. ¤³¤Î¥â¥¸¥å¡¼¥ë¤ÏºÇ½é Stacy Lacy ¤Ë¤è¤Ã¤Æ1997ǯ¤ËºîÀ®¤µ¤ì¡¢ºÇ¸å¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï1998ǯ¤ËCPAN¤Ë¥¢¥Ã¥×¥í¡¼¥É¤µ¤ì¤Þ¤·¤¿¡£½¤Àµ¤µ¤ì¤¿¥Ð¡¼¥¸¥ç¥ó¤òÇÛÉÛ¤¹¤ë¤¿¤á¡¢¤³¤Î¥â¥¸¥å¡¼¥ë¤ò2000ǯ7·î¤Ë Anthony Peacockhe ¤¬°ú¤­·Ñ¤®¤Þ¤·¤¿¡£¤³¤Î°ú·Ñ¤Ï Stacy Lacy ¤ÎÌÀ³Î¤ÊƱ°Õ̵¤·¤Ë¹Ô¤ï¤ì¤Þ¤·¤¿¡¢¤Ê¤¼¤Ê¤é¤½¤Î»þ¤ËÈà¤é¤ÈÏ¢Íí¤ò¤È¤ë¤³¤È¤¬ÉÔ²Äǽ¤Ç¤¢¤ë¤Èʬ¤«¤Ã¤¿¤«¤é¤Ç¤¹¡£¤³¤Î°ú·Ñ¤ËÂФ¹¤ëÌÀ³Î¤ÊƱ°Õ¤Ï¡¢Ì¤¤ÀÆÀ¤é¤ì¤Æ¤¤¤Þ¤»¤ó¡£ =head1 AUTHOR ºî¼Ô ¡Ê¸¶Ê¸¤Î¤Þ¤Þ¡Ë Anthony Peacock, a.peacock@chime.ucl.ac.uk Stacy Lacy (Original author) =head1 CONTRIBUTIONS ¶¨ÎÏ¼Ô ¡Ê¸¶Ê¸¤Î¤Þ¤Þ¡Ë Jay Flaherty, fty@mediapulse.com For ROW, COL & CELL HEAD methods. Modified the new method to allow hash of values. John Stumbles, john@uk.stumbles.org For autogrow behaviour of setCell, and allowing alignment specifications to be case insensitive Arno Teunisse, Arno.Teunisse@Simac.nl For the methods adding rules, styles and table alignment attributes. Ville Skytta, ville.skytta@iki.fi For general fixes Paul Vernaza, vernaza@stwing.upenn.edu For the setLast... methods David Link, dvlink@yahoo.com For the sort method Tommi Maekitalo, t.maekitalo@epgmbh.de For adding the 'head' parameter to the new method and for adding the initialisation from an array ref to the new method. =head1 COPYRIGHT Ãøºî¸¢ ¡Ê¸¶Ê¸¤Î¤Þ¤Þ¡Ë Copyright (c) 2000-2003 Anthony Peacock, CHIME. Copyright (c) 1997 Stacy Lacy This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO ´ØÏ¢¹àÌÜ perl(1), CGI(3) =head1 Translators into Japanese ËÝÌõ¼Ô 1) Previous ver.: oota (at itp.nec.co.jp) 2) Ver. 2.02: anahori (at users.sourceforge.jp) Japanized ?Perl?Resources? Project (http://sourceforge.jp/projects/perldocjp/) =cut