TableColumn.php:
<?php
/*
* TableColumn.php
* Copyright (C) 2004-2005, Alejandro Espinoza Esparza.
*
* Description :
* This class manages a column for the table widget.
*
* Author(s):
* Alejandro Espinoza <aespinoza <at> structum.com <dot> mx>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
import("moebius2.base.ObjectManager");
/**
* Class manages a column for the table widget.
*
* @class TableColumn
* @package moebius2.xhtml.widgets
* @author Alejandro Espinoza <aespinoza <at> structum.com <dot> mx>
* @version 1.0
* @extends ObjectManager
* @requires ObjectManager
* @see ObjectManager
*/
class TableColumn extends ObjectManager
{
/* --- Attributes --- */
var $name;
var $rows;
/* --- Methods --- */
/**
* Constructor, initializes the widget.
* @method TableColumn
* @param string colName
* @returns none.
*/
function TableColumn($colName)
{
ObjectManager::ObjectManager("moebius2.xhtml.widgets", "TableColumn");
$this->name = $colName;
}
/**
* Adds a new row to the column.
*
* @method AddRow
* @param string row
* @returns none.
*/
function AddRow($row)
{
$this->rows[count($this->rows)] = $row;
}
/**
* Returns the selected row from the column.
*
* @method GetRowAt
* @param int index
* @returns string containing the row.
*/
function GetRowAt($index)
{
return $this->rows[$index];
}
/**
* Returns the name of the column
*
* @method GetName
* @returns string containing the name of the column.
*/
function GetName()
{
return $this->name;;
}
}
?>
Other Development Tools Scripts: