Currently the PercentageBarDecorator assumes that the cell data is of type Number. If that is not the case, a class cast exception is thrown.
There might be situations where the data type is a String and needs a special conversion. As this interferes with the default converter mechanism, the easiest way for customization is to add a convertDataType() method, similar to the CheckBoxPainter. As a difference, it is not possible to use the registered display converter, as the value that is shown on top of the percentage bar needs to be still a String.
Currently the
PercentageBarDecorator
assumes that the cell data is of typeNumber
. If that is not the case, a class cast exception is thrown.There might be situations where the data type is a String and needs a special conversion. As this interferes with the default converter mechanism, the easiest way for customization is to add a
convertDataType()
method, similar to theCheckBoxPainter
. As a difference, it is not possible to use the registered display converter, as the value that is shown on top of the percentage bar needs to be still a String.