[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/Web/UI/WebControls/ -> TTable.php (sommaire)

TTable and TTableRowCollection class file

Author: Qiang Xue <qiang.xue@gmail.com>
Copyright: Copyright © 2005 PradoSoft
License: http://www.pradosoft.com/license/
Version: $Id: TTable.php 1397 2006-09-07 07:55:53Z wei $
Poids: 411 lignes (11 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 3 classes

TTable:: (22 méthodes):
  getTagName()
  addParsedObject()
  createStyle()
  addAttributesToRender()
  createControlCollection()
  getRows()
  getCaption()
  setCaption()
  getCaptionAlign()
  setCaptionAlign()
  getCellSpacing()
  setCellSpacing()
  getCellPadding()
  setCellPadding()
  getHorizontalAlign()
  setHorizontalAlign()
  getGridLines()
  setGridLines()
  getBackImageUrl()
  setBackImageUrl()
  renderBeginTag()
  renderContents()

TTableRowCollection:: (1 méthode):
  insertAt()

TTableCaptionAlign:: (0 méthodes):


Classe: TTable  - X-Ref

TTable class

TTable displays an HTML table on a Web page.

A table may have {@link setCaption Caption}, whose alignment is specified
via {@link setCaptionAlign CaptionAlign}. The table cellpadding and cellspacing
are specified via {@link setCellPadding CellPadding} and {@link setCellSpacing CellSpacing}
properties, respectively. The {@link setGridLines GridLines} specifies how
the table should display its borders. The horizontal alignment of the table
content can be specified via {@link setHorizontalAlign HorizontalAlign},
and {@link setBackImageUrl BackImageUrl} can assign a background image to the table.

A TTable maintains a list of {@link TTableRow} controls in its
{@link getRows Rows} property. Each {@link TTableRow} represents
an HTML table row.

To populate the table {@link getRows Rows}, you may either use control template
or dynamically create {@link TTableRow} in code.
In template, do as follows to create the table rows and cells,
<code>
<com:TTable>
<com:TTableRow>
<com:TTableCell Text="content" />
<com:TTableCell Text="content" />
</com:TTableRow>
<com:TTableRow>
<com:TTableCell Text="content" />
<com:TTableCell Text="content" />
</com:TTableRow>
</com:TTable>
</code>
The above can also be accomplished in code as follows,
<code>
$table=new TTable;
$row=new TTableRow;
$cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell);
$cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell);
$table->Rows->add($row);
$row=new TTableRow;
$cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell);
$cell=new TTableCell; $cell->Text="content"; $row->Cells->add($cell);
$table->Rows->add($row);
</code>

getTagName()   X-Ref

return: string tag name for the table

addParsedObject($object)   X-Ref
Adds object parsed from template to the control.
This method adds only {@link TTableRow} objects into the {@link getRows Rows} collection.
All other objects are ignored.

param: mixed object parsed from template

createStyle()   X-Ref
Creates a style object for the control.
This method creates a {@link TTableStyle} to be used by the table.

return: TTableStyle control style to be used

addAttributesToRender($writer)   X-Ref
Adds attributes to renderer.

param: THtmlWriter the renderer

createControlCollection()   X-Ref
Creates a control collection object that is to be used to hold child controls

return: TTableRowCollection control collection

getRows()   X-Ref

return: TTableRowCollection list of {@link TTableRow} controls

getCaption()   X-Ref

return: string table caption

setCaption($value)   X-Ref

param: string table caption

getCaptionAlign()   X-Ref

return: TTableCaptionAlign table caption alignment. Defaults to TTableCaptionAlign::NotSet.

setCaptionAlign($value)   X-Ref

param: TTableCaptionAlign table caption alignment.

getCellSpacing()   X-Ref

return: integer the cellspacing for the table. Defaults to -1, meaning not set.

setCellSpacing($value)   X-Ref

param: integer the cellspacing for the table. Defaults to -1, meaning not set.

getCellPadding()   X-Ref

return: integer the cellpadding for the table. Defaults to -1, meaning not set.

setCellPadding($value)   X-Ref

param: integer the cellpadding for the table. Defaults to -1, meaning not set.

getHorizontalAlign()   X-Ref

return: THorizontalAlign the horizontal alignment of the table content. Defaults to THorizontalAlign::NotSet.

setHorizontalAlign($value)   X-Ref

param: THorizontalAlign the horizontal alignment of the table content.

getGridLines()   X-Ref

return: TTableGridLines the grid line setting of the table. Defaults to TTableGridLines::None.

setGridLines($value)   X-Ref

param: TTableGridLines the grid line setting of the table

getBackImageUrl()   X-Ref

return: string the URL of the background image for the table

setBackImageUrl($value)   X-Ref
Sets the URL of the background image for the table

param: string the URL

renderBeginTag($writer)   X-Ref
Renders the openning tag for the table control which will render table caption if present.

param: THtmlWriter the writer used for the rendering purpose

renderContents($writer)   X-Ref
Renders body contents of the table.

param: THtmlWriter the writer used for the rendering purpose.

Classe: TTableRowCollection  - X-Ref

TTableRowCollection class.

TTableRowCollection is used to maintain a list of rows belong to a table.

insertAt($index,$item)   X-Ref
Inserts an item at the specified position.
This overrides the parent implementation by performing additional
operations for each newly added table row.

param: integer the speicified position.
param: mixed new item

Classe: TTableCaptionAlign  - X-Ref

TTableCaptionAlign class.
TTableCaptionAlign defines the enumerable type for the possible alignments
that a table caption can take.

The following enumerable values are defined:
- NotSet: alignment not specified
- Top: top aligned
- Bottom: bottom aligned
- Left: left aligned
- Right: right aligned



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7