silverorange Code


Swat.SwatMoneyCellRenderer
/Swat/SwatMoneyCellRenderer.php at line 15

Class SwatMoneyCellRenderer

SwatObject
└─SwatUIObject
└─SwatCellRenderer
└─SwatMoneyCellRenderer

public class SwatMoneyCellRenderer
extends SwatCellRenderer

A currency cell renderer

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

Field Summary
integer

$decimal_places

Number of decimal places to display.

boolean

$display_currency

If SwatMoneyCellRenderer::$international is false, whether to render the international currency symbol.

boolean

$international

Whether or not to render the currency value using the international format for the specified locale.

string

$locale

Optional locale for currency format.

float

$value

Monetary value.

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

SwatMoneyCellRenderer()

Creates a money cell renderer.

Method Summary
void

render()

Renders the contents of this cell.

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/SwatMoneyCellRenderer.php at line 71

decimal_places

public integer $decimal_places = null

Number of decimal places to display

If set to null, the default number of decimal places for the specified locale is used.


/Swat/SwatMoneyCellRenderer.php at line 49

display_currency

public boolean $display_currency = false

If SwatMoneyCellRenderer::$international is false, whether to render the international currency symbol

If true, displays the international currency symbol. Use of this property is discouraged in favour of using the SwatMoneyCellRendere::$international property. Using this property can render strings that are incorrect for the given locale. Using the international property always renders strings correctly for the specified locale.

If SwatMoneyCellRenderer::$international is true, this property has no effect.


/Swat/SwatMoneyCellRenderer.php at line 61

international

public boolean $international = false

Whether or not to render the currency value using the international format for the specified locale

This uses the international currency symbol of the specified locale instead of the national symbol. For example, the locale en_CA would render $10 as CAD 10.00.


/Swat/SwatMoneyCellRenderer.php at line 24

locale

public string $locale = null

Optional locale for currency format


/Swat/SwatMoneyCellRenderer.php at line 31

value

public float $value

Monetary value


Constructor Detail

/Swat/SwatMoneyCellRenderer.php at line 79

SwatMoneyCellRenderer

public SwatMoneyCellRenderer()

Creates a money cell renderer


Method Detail

/Swat/SwatMoneyCellRenderer.php at line 96

render

public void render()

Renders the contents of this cell

See Also:
SwatCellRenderer::render()

silverorange Code