pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: Activity Indicator in accordion header
Date Tue, 22 Mar 2011 13:13:58 GMT
The reason this doesn't work is because accordion header data is painted by a renderer, which,
as Chris mentioned, is only painted when the accordion skin thinks it needs to be refreshed.
When active, an activity indicator runs a timer that attempts to repaint it every n milliseconds.
However, in order for the repaint to happen, the activity indicator must be part of the component
hierarchy, which renderers are not.

Re: Chris's suggestion:

> Your TerraAccordionSkin might override these so that the header is a simply a real BoxPane
with an ActivityIndicator and a Label inside.  Then the BoxPane skin (and ActivityIndicator
& Label skins) will take care of painting, and more importantly, animating.
> (ie, use real, fully fledged Components, rather than a Renderer for each header)


This seems like a reasonable approach. Just one thought - while you could certainly hard-code
the use of a Label here, continuing to use a renderer will offer you a little more flexibility
(for example, if you want to use icons in your headers).

G

On Mar 21, 2011, at 4:16 AM, Simon Chatelain wrote:

> Hello all,
> 
> I am trying to display an animated component inside the headers of an accordion. For
that I defined a subclass of AccordionHeaderDataRenderer inserting a ActivityIndicator at
first position in the header.
> 
> But the activity indicator animation is not refreshed unless I move the mouse cursor
over the header. What am I doing wrong and is there a way to do that ?
> You can find in attachment a sample application showing the described behavior.
> 
> Thanks
> 
> Simon
> <AnimatedHeader.zip>


Mime
View raw message