classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: BoxLayout and SizeRequirements fix


From: Roman Kennke
Subject: [cp-patches] FYI: BoxLayout and SizeRequirements fix
Date: Sun, 25 Sep 2005 12:20:55 +0200

Hi,

Thanks to some hints on the classpath-ML I was finally able to fill in
the missing pieces in SizeRequirements and rewrite BoxLayout to use this
helper class. This hugely simplifies the BoxLayout class and should fix
most issues with it. (and yes, the example posted in the original
posting now looks like with Sun).

There is still some finetuning needed in both BoxLayout and
SizeRequirements (I added FIXMEs at these places) and lots of room for
optimization in BoxLayout (we can cache most SizeRequirements objects
and the calculated layout). I will look into both during the next days.

2005-09-24  Roman Kennke  <address@hidden>

        * javax/swing/SizeRequirements.java
        (getAlignedRequirements): Implemented this method.
        (calculateAlignedPositions): Implemented this method.
        * javax/swing/BoxLayout.java
        (Direction): Removed unneeded inner interface.
        (Horizontal): Removed unneeded inner class.
        (Vertical): Removed unneeded inner class.
        (SizeReq): Removed unneeded inner class.
        (preferredLayoutSize): Reimplemented to use SizeRequirements.
        (minimumLayoutSize): Reimplemented to use SizeRequirements.
        (maximumLayoutSize): Reimplemented to use SizeRequirements.
        (layoutContainer): Reimplemented to use SizeRequirements.
        (layoutAlgorithm): Removed unneeded package private method.
        (distributeSpace): Removed unneeded package private method.
        (getSizeRequirements): New private helper method.

/Roman



Attachment: BoxLayout.diff
Description: Text Data

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

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