silverorange Code


Swat.SwatBooleanCellRenderer
/Swat/SwatBooleanCellRenderer.php at line 15

Class SwatBooleanCellRenderer

SwatObject
└─SwatUIObject
└─SwatCellRenderer
└─SwatBooleanCellRenderer

public class SwatBooleanCellRenderer
extends SwatCellRenderer

A cell renderer for a boolean value

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

Field Summary
string

$content_type

Optional content type.

string

$false_content

Optional content to display for a false value.

string

$stock_id

The stock id of this SwatBooleanCellRenderer.

string

$true_content

Optional content to display for a true value.

boolean

$value

Value of this cell.

Fields inherited from Swat.SwatCellRenderer
id, sensitive
Fields inherited from Swat.SwatUIObject
classes, html_head_entry_set, parent, visible
Method Summary
protected void

displayCheck()

Renders a checkmark image for this boolean cell renderer.

void

render()

Renders the contents of this cell.

protected void

renderFalse()

Renders a false value for this boolean cell renderer.

protected void

renderTrue()

Renders a true value for this boolean cell renderer.

void

setFromStock(string stock_id, boolean overwrite_properties)

Sets the values of this boolean cell renderer to a stock type.

Methods inherited from Swat.SwatCellRenderer
getBaseCSSClassNames, getDataSpecificCSSClassNames, getHtmlHeadEntrySet, getInheritanceCSSClassNames, getInlineJavaScript, getMessages, getPropertyNameToMap, hasMessage, init, isPropertyStatic, makePropertyStatic, process, render
Methods inherited from Swat.SwatUIObject
addComment, addJavaScript, addStyleSheet, addTangoAttribution, copy, getCSSClassNames, getCSSClassString, getFirstAncestor, getHtmlHeadEntrySet, getInlineJavaScript, getUniqueId, isVisible

Field Detail

/Swat/SwatBooleanCellRenderer.php at line 49

content_type

public string $content_type = 'text/plain'

Optional content type

Defaults to text/plain, use text/xml for XHTML fragments.


/Swat/SwatBooleanCellRenderer.php at line 40

false_content

public string $false_content = null

Optional content to display for a false value.


/Swat/SwatBooleanCellRenderer.php at line 61

stock_id

public string $stock_id = null

The stock id of this SwatBooleanCellRenderer

Specifying a stock id initializes this boolean cell renderer with a set of stock values.

See Also:
SwatBooleanCellRenderer::setFromStock()

/Swat/SwatBooleanCellRenderer.php at line 33

true_content

public string $true_content = null

Optional content to display for a true value.


/Swat/SwatBooleanCellRenderer.php at line 26

value

public boolean $value

Value of this cell

The boolean value to display in this cell.


Method Detail

/Swat/SwatBooleanCellRenderer.php at line 184

displayCheck

protected void displayCheck()

Renders a checkmark image for this boolean cell renderer

This is used when this cell renderer has a SwatBooleanCellRenderer::$stock_id of 'check-only'.


/Swat/SwatBooleanCellRenderer.php at line 126

render

public void render()

Renders the contents of this cell

See Also:
SwatCellRenderer::render()

/Swat/SwatBooleanCellRenderer.php at line 167

renderFalse

protected void renderFalse()

Renders a false value for this boolean cell renderer


/Swat/SwatBooleanCellRenderer.php at line 153

renderTrue

protected void renderTrue()

Renders a true value for this boolean cell renderer


/Swat/SwatBooleanCellRenderer.php at line 83

setFromStock

public void setFromStock(string stock_id, boolean overwrite_properties)

Sets the values of this boolean cell renderer to a stock type

Valid stock type ids are:

Parameters:
stock_id - the identifier of the stock type to use.
overwrite_properties - optional. Whether to overwrite properties if they are already set. By default, properties are overwritten.
Throws:
if an undefined $stock_id is used.

silverorange Code