How to extend an UI "class"?

How to extend an UI "class"?


Is there a way to extend an already existing UI class?
For example the progress bar. To add a text to it, I would override
the value setter method to grap the set-text call, otherwise calling
the super.set..()
And the init, where I would add a new DIV containing the text (center
aligned)
Is there a way to do this?
(calling super, extend an UI component, ...)
Can someone show me a short example?
Thanks.
Tamas