Return-Path: Delivered-To: apmail-pivot-user-archive@www.apache.org Received: (qmail 2791 invoked from network); 21 Mar 2011 15:08:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Mar 2011 15:08:26 -0000 Received: (qmail 84143 invoked by uid 500); 21 Mar 2011 15:08:26 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 84121 invoked by uid 500); 21 Mar 2011 15:08:26 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 84113 invoked by uid 99); 21 Mar 2011 15:08:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 15:08:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cbartlett.x@gmail.com designates 209.85.215.54 as permitted sender) Received: from [209.85.215.54] (HELO mail-ew0-f54.google.com) (209.85.215.54) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 15:08:19 +0000 Received: by ewy1 with SMTP id 1so1659058ewy.13 for ; Mon, 21 Mar 2011 08:07:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=EvOfcKysxgd2cCSC/g9rQAGv2Z+iov4ruPSFAAKngmk=; b=hks/5p4leEi6jcJgGLwBSf1AbXEcT8ioWfPEq/zbpOpK+qJ09KaPYiZSSA+HAgK2NR tffFtF61T2uDIJaHyRY6rO9JdIWALmU1j84Pp3pYNRK9oD8nC2EHWS+gO84797hUQWFX z2+sBIZe8VmzYE64Dn9gcEI+U47cU3xCGBlY0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=CM3M36TyP3Z1zJhYjfqGBLlqqZJ65vIuBas7VzS8M134ML48u/N/uQwUAywWlDeiUL 8XY84f73tMC/ZDoUBybSXHSdqUv+pFhElPVf+AwBWA8WWPTwbieA7rG48poj1KjGktes 9ZWNV2D3wMuICX6wbSve+4hwlmfRjDtg59KQM= MIME-Version: 1.0 Received: by 10.14.120.145 with SMTP id p17mr1251256eeh.76.1300720078722; Mon, 21 Mar 2011 08:07:58 -0700 (PDT) Received: by 10.14.124.140 with HTTP; Mon, 21 Mar 2011 08:07:58 -0700 (PDT) In-Reply-To: References: Date: Mon, 21 Mar 2011 22:07:58 +0700 Message-ID: Subject: Re: Activity Indicator in accordion header From: Chris Bartlett To: user@pivot.apache.org Content-Type: multipart/alternative; boundary=e0cb4e7005cf3e990f049eff7e31 X-Virus-Checked: Checked by ClamAV on apache.org --e0cb4e7005cf3e990f049eff7e31 Content-Type: text/plain; charset=ISO-8859-1 Another thought might be to ditch the renderer approach entirely and to create a custom subclass of Accordion along with a custom skin extending org.apache.pivot.wtk.skin.terra.TerraAccordionSkin. (Or just copy both classes and edit to create your own parallel versions rather than extending) I haven't prototyped it, but I think it (or something similar) should work, although I'm not sure it is necessarily preferable to just managing the repaint callbacks yourself. TerraAccordionSkin contains these 2 inner classes which deal with the Accordion headers and will normally use a supplied renderer to render the header. org.apache.pivot.wtk.skin.terra.TerraAccordionSkin.PanelHeader org.apache.pivot.wtk.skin.terra.TerraAccordionSkin.PanelHeaderSkin 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) For more flexibility you might expose the BoxPane used for each header so that you can set its content, properties and styles as required. Chris --e0cb4e7005cf3e990f049eff7e31 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Another thought might be to ditch the renderer approach entirely and t= o create a custom subclass of Accordion along with a custom skin extending = org.apache.pivot.wtk.skin.terra.TerraAccordionSkin. =A0
(Or just = copy both classes and edit to create your own parallel versions rather than= extending)
I haven't prototyped it, but I think it (or something similar) sho= uld work, although I'm not sure it is necessarily preferable to just ma= naging the repaint callbacks yourself.

TerraAc= cordionSkin contains these 2 inner classes which deal with the Accordion he= aders and will normally use a supplied renderer to render the header.
org.apache.pivot.wtk.skin.terra.TerraAccordionSkin.PanelHeader
org.= apache.pivot.wtk.skin.terra.TerraAccordionSkin.PanelHeaderSkin

Your=A0TerraAccordionSkin might override these so that the= header is a simply a real BoxPane with an ActivityIndicator and a Label in= side. =A0Then the BoxPane skin (and ActivityIndicator & Label skins) wi= ll take care of painting, and more importantly, animating.
(ie, use real, fully fledged Components, rather than a Renderer for ea= ch header)

For more flexibility you might expose t= he BoxPane used for each header so that you can set its content, properties= and styles as required.

Chris
--e0cb4e7005cf3e990f049eff7e31--