[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gzz] PEG Colorable Vob
From: |
Asko Soukka |
Subject: |
Re: [Gzz] PEG Colorable Vob |
Date: |
Wed, 12 Mar 2003 11:58:43 +0200 (EET) |
Tue, 11 Mar 2003, Asko Soukka wrote:
> And finally an example how using this would look in BoxCellView:
...
> /** If multiple colors found, clone multi-colored version
> * of default vob. Otherwise use default vob as it is.
> */
> final ColorableVob bg;
> if (vobColors.size() > 0) {
> Color[] colors = (Color[]) vobColors.toArray(new Color[1]);
> bg = (ColorableVob)defaultBg.cloneColored(colors);
> } else bg = defaultBg;
Should Colorable.cloneColored() return itself, if attribute colors is
empty or null? It would make the previous example cleaner - no ifs would
be needed anymore:
Color[] colors = (Color[]) vobColors.toArray(new Color[1]);
bg = (ColorableVob)defaultBg.cloneColored(colors);
--
Asko Soukka <address@hidden>
<http://www.iki.fi/asko.soukka/>