summaryrefslogtreecommitdiffstats
path: root/qx08/source/class/tr/ui/Cellrenderer.js
diff options
context:
space:
mode:
Diffstat (limited to 'qx08/source/class/tr/ui/Cellrenderer.js')
-rw-r--r--qx08/source/class/tr/ui/Cellrenderer.js43
1 files changed, 24 insertions, 19 deletions
diff --git a/qx08/source/class/tr/ui/Cellrenderer.js b/qx08/source/class/tr/ui/Cellrenderer.js
index f18672d..6a89da9 100644
--- a/qx08/source/class/tr/ui/Cellrenderer.js
+++ b/qx08/source/class/tr/ui/Cellrenderer.js
@@ -6,6 +6,7 @@
* Tobias Oetiker
************************************************************************ */
+
/* ************************************************************************
#module(Tr)
************************************************************************ */
@@ -13,34 +14,38 @@
/**
* A configurable cell renderre
*/
+qx.Class.define('tr.ui.Cellrenderer', {
+ extend : qx.ui.table.cellrenderer.Number,
+
-qx.Class.define('Tr.ui.Cellrenderer',
-{
- extend: qx.ui.table.cellrenderer.Number,
/**
- * Format a number with a configurable number of fraction digits
- * and add optional pre and postfix.
- * @param digits {Integer} how many digits should there be. Default is 0.
- * @param prefix {String} optional prefix.
- * @param postfix {String} optional postfix.
- */
-
- construct: function (digits,postfix,prefix) {
- if (digits == undefined){
+ * Format a number with a configurable number of fraction digits
+ * and add optional pre and postfix.
+ * @param digits {Integer} how many digits should there be. Default is 0.
+ * @param prefix {String} optional prefix.
+ * @param postfix {String} optional postfix.
+ */
+ construct : function(digits, postfix, prefix) {
+ if (digits == undefined) {
digits = 0;
}
- this.base(arguments)
+
+ this.base(arguments);
var format = new qx.util.format.NumberFormat();
+
format.set({
- maximumFractionDigits: digits,
- minimumFractionDigits: digits
+ maximumFractionDigits : digits,
+ minimumFractionDigits : digits
});
- if (postfix != undefined){
+
+ if (postfix != undefined) {
format.setPostfix(postfix);
}
- if (prefix != undefined){
+
+ if (prefix != undefined) {
format.setPrefix(prefix);
- }
+ }
+
this.setNumberFormat(format);
}
-});
+}); \ No newline at end of file