I'd suggest extending org.apache.pivot.wtk.content.TableViewNumberCellRenderer.
If you are using Pivot 2.0, you can override toString() and return "-" whenever
the cell value is 0, and super.toString() otherwise.
If you are using Pivot 1.5, you can override render() - when the cell value is
0, call setText("-") and renderStyles() directly; otherwise, call
super.render().
G
On Oct 23, 2010, at 6:10 AM, lello wrote:
>
> Hi All,
>
> I have a TableView in which a column must display numbers.
> when ths number is 0 I don't want it to be displayed, but I'd like to put
> something like a dash
> or just nothing. I am trying to write a custom renderer, but the only thing
> I can do is to change
> the number format. Is that possible?
>
>
> Lello
> --
> View this message in context:
> http://apache-pivot-users.399431.n3.nabble.com/TableView-Custom-Rendered-tp1757203p1757203.html
> Sent from the Apache Pivot - Users mailing list archive at Nabble.com.