SwatObject
└─SwatUIObject
└─SwatCellRenderer
└─SwatMoneyCellRenderer
public class SwatMoneyCellRenderer
extends SwatCellRenderer
| Field Summary | |
|---|---|
| integer | Number of decimal places to display. |
| boolean | If SwatMoneyCellRenderer::$international is false, whether to render the international currency symbol. |
| boolean | Whether or not to render the currency value using the international format for the specified locale. |
| string | Optional locale for currency format. |
| float | Monetary value. |
| Fields inherited from Swat.SwatCellRenderer | |
|---|---|
| id, sensitive | |
| Fields inherited from Swat.SwatUIObject | |
|---|---|
| classes, html_head_entry_set, parent, visible | |
| Constructor Summary | |
|---|---|
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 | |
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.
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.
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.
public string $locale = null
Optional locale for currency format
public float $value
Monetary value
public SwatMoneyCellRenderer()
Creates a money cell renderer
public void render()
Renders the contents of this cell
A currency cell renderer