silverorange Code


Swat.SwatCellRendererContainer
/Swat/SwatCellRendererContainer.php at line 18

Class SwatCellRendererContainer

SwatObject
└─SwatUIObject
└─SwatCellRendererContainer

public abstract class SwatCellRendererContainer
extends SwatUIObject

Abstract base class for objects which contain cell renderers.

Copyright:
2006-2007 silverorange
License:
http://www.gnu.org/copyleft/lesser.html LGPL License 2.1

Field Summary
protected SwatCellRendererSet

$renderers

The set of SwatCellRenderer objects contained in this container.

Fields inherited from Swat.SwatUIObject
classes, html_head_entry_set, parent, visible
Constructor Summary

SwatCellRendererContainer()

Creates a new cell renderer container.

Method Summary
void

addChild(SwatCellRenderer child)

Add a child object to this object.

SwatCellRendererMapping

addMappingToRenderer(SwatCellRenderer renderer, string data_field, string property, SwatUIObject object)

Links a data-field to a cell renderer property of a cell renderer within this container.

void

addRenderer(SwatCellRenderer renderer)

Adds a cell renderer to this container's set of renderers.

SwatUIObject

copy(string id_suffix)

Performs a deep copy of the UI tree starting with this UI object.

array

getDescendantStates()

Gets descendant states.

array

getDescendants(string class_name)

Gets descendant UI-objects.

SwatUIObject

getFirstDescendant(string class_name)

Gets the first descendant UI-object of a specific class.

SwatCellRenderer

getFirstRenderer()

Gets the first cell renderer in this container.

SwatHtmlHeadEntrySet

getHtmlHeadEntrySet()

Gets the SwatHtmlHeadEntry objects needed by this cell renderer container.

SwatCellRenderer

getRenderer(mixed renderer_id, string the)

Gets a cell renderer of this container by its unique identifier.

SwatCellRenderer

getRendererByPosition(mixed position, $position the)

Gets a cell renderer in this container based on its ordinal position.

string

getRendererInlineJavaScript()

Gets inline JavaScript used by all cell renderers within this cell renderer container.

array

getRenderers()

Gets the cell renderers of this container.

void

setDescendantStates(array states)

Sets descendant states.

Methods inherited from Swat.SwatUIObject
addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible

Field Detail

/Swat/SwatCellRendererContainer.php at line 28

renderers

protected SwatCellRendererSet $renderers = null

The set of SwatCellRenderer objects contained in this container


Constructor Detail

/Swat/SwatCellRendererContainer.php at line 36

SwatCellRendererContainer

public SwatCellRendererContainer()

Creates a new cell renderer container


Method Detail

/Swat/SwatCellRendererContainer.php at line 180

addChild

public void addChild(SwatCellRenderer child)

Add a child object to this object

Parameters:
child - the reference to the child object to add.
Throws:
if the given $child is not an instance of {@link SwatCellRenderer}.
See Also:
SwatUIParent::addChild()

/Swat/SwatCellRendererContainer.php at line 65

addMappingToRenderer

public SwatCellRendererMapping addMappingToRenderer(SwatCellRenderer renderer, string data_field, string property, SwatUIObject object)

Links a data-field to a cell renderer property of a cell renderer within this container

Parameters:
renderer - the cell renderer in this container onto which the data-field is to be mapped.
data_field - the field of the data model to map to the cell renderer property.
property - the property of the cell renderer to which the $data_field is mapped.
object - optional. The object containing the property to map when the property does not belong to the cell renderer itself. If unspecified, the $property must be a property of the given cell renderer.
Returns:
a new mapping object that has been added to the renderer.

/Swat/SwatCellRendererContainer.php at line 88

addRenderer

public void addRenderer(SwatCellRenderer renderer)

Adds a cell renderer to this container's set of renderers

Parameters:
renderer - the renderer to add.

/Swat/SwatCellRendererContainer.php at line 366

copy

public SwatUIObject copy(string id_suffix)

Performs a deep copy of the UI tree starting with this UI object

Parameters:
id_suffix - optional. A suffix to append to copied UI objects in the UI tree.
Returns:
a deep copy of the UI tree starting with this UI object.
See Also:
SwatUIObject::copy()

/Swat/SwatCellRendererContainer.php at line 278

getDescendantStates

public array getDescendantStates()

Gets descendant states

Retrieves an array of states of all stateful UI-objects in the widget subtree below this cell renderer container.

Returns:
an array of UI-object states with UI-object identifiers as array keys.

/Swat/SwatCellRendererContainer.php at line 206

getDescendants

public array getDescendants(string class_name)

Gets descendant UI-objects

Parameters:
class_name - optional class name. If set, only UI-objects that are instances of $class_name are returned.
Returns:
the descendant UI-objects of this cell renderer container. If descendant objects have identifiers, the identifier is used as the array key.
See Also:
SwatUIParent::getDescendants()

/Swat/SwatCellRendererContainer.php at line 243

getFirstDescendant

public SwatUIObject getFirstDescendant(string class_name)

Gets the first descendant UI-object of a specific class

Parameters:
class_name - class name to look for.
Returns:
the first descendant UI-object or null if no matching descendant is found.
See Also:
SwatUIParent::getFirstDescendant()

/Swat/SwatCellRendererContainer.php at line 162

getFirstRenderer

public SwatCellRenderer getFirstRenderer()

Gets the first cell renderer in this container

Returns:
the first cell renderer in this container or null if this container contains no cell renderers.

/Swat/SwatCellRendererContainer.php at line 319

getHtmlHeadEntrySet

public SwatHtmlHeadEntrySet getHtmlHeadEntrySet()

Gets the SwatHtmlHeadEntry objects needed by this cell renderer container

Returns:
the SwatHtmlHeadEntry objects needed by this cell renderer container.
See Also:
SwatUIObject::getHtmlHeadEntrySet()

/Swat/SwatCellRendererContainer.php at line 127

getRenderer

public SwatCellRenderer getRenderer(mixed renderer_id, string the)

Gets a cell renderer of this container by its unique identifier

Parameters:
the - unique identifier of the cell renderer to get.
Returns:
the cell renderer of this container with the provided unique identifier.
Throws:
if a renderer with the given $renderer_id does not exist in this container.

/Swat/SwatCellRendererContainer.php at line 147

getRendererByPosition

public SwatCellRenderer getRendererByPosition(mixed position, $position the)

Gets a cell renderer in this container based on its ordinal position

Parameters:
the - ordinal position of the cell renderer to get. The position is zero-based.
Returns:
the renderer at the specified ordinal position.
Throws:
if the requested $position is greater than the number of cell renderers in this container.

/Swat/SwatCellRendererContainer.php at line 339

getRendererInlineJavaScript

public string getRendererInlineJavaScript()

Gets inline JavaScript used by all cell renderers within this cell renderer container

Returns:
the inline JavaScript used by all cell renderers within this cell renderer container.

/Swat/SwatCellRendererContainer.php at line 102

getRenderers

public array getRenderers()

Gets the cell renderers of this container

Returns:
an array containing the cell renderers in this container.

/Swat/SwatCellRendererContainer.php at line 300

setDescendantStates

public void setDescendantStates(array states)

Sets descendant states

Sets states on all stateful UI-objects in the widget subtree below this cell renderer container.

Parameters:
states - an array of UI-object states with UI-object identifiers as array keys.

silverorange Code