classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] FYI: Fix for BoxLayout


From: Tom Tromey
Subject: Re: [cp-patches] FYI: Fix for BoxLayout
Date: 27 Jun 2005 11:08:16 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Roman" == Roman Kennke <address@hidden> writes:

Roman> +  public static Component[] getVisibleChildren(Container c)
Roman> +  {
Roman> +    Component[] children = c.getComponents();
Roman> +    Vector visible = new Vector();
Roman> +    for (int i = 0; i < children.length; i++)
Roman> +      if (children[i].isVisible())
Roman> +        visible.add(children[i]);
Roman> +    return (Component[]) visible.toArray(new Container[visible.size()]);

This means multiple allocations per layout.
I wonder whether that is noticeable in a profile.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]