This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: implemented javax.swing.BoxLayout
- From: "graydon hoare" <graydon at redhat dot com>
- To: "Roman Kennke" <roman at ontographics dot com>
- Cc: "java-patches.gcc.gnu.org" <java-patches at gcc dot gnu dot org>
- Date: Sat, 24 Jul 2004 18:47:12 -0400
- Subject: Re: implemented javax.swing.BoxLayout
- Organization: red hat
- References: <1090631079.4220.10.camel@moonlight.localdomain>
On Sat, 24 Jul 2004 03:04:39 +0200, Roman Kennke <roman@ontographics.com> wrote:
I saw that the current BoxLayout implementation only wraps a GridLayout.
I have fixed that, so that it now does layout computation on its own and
works as it should.
This improves the appearance of JMenuBars and disturbs the appearance of
some dialogs (I think they relied on the GridLayout behaviour and now
have to be slightly adjusted).
Please review it and check it in, if you find it ok.
a few comments:
- each subcomponent should only have one preferred/maximum/minimum size
call during calculations, not one for height and another for width.
- you missed the LINE_AXIS case in getPreferredSize()
- the LINE_AXIS and PAGE_AXIS directions are supposed to be interpreted
relative to the current component orientation (LINE may be vertical for
vertically-laid-out text, for example).
I've fixed these, though, and am checking the attached, revised patch in.
thanks!
-graydon