classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: BoxLayout rewrite


From: Roman Kennke
Subject: [cp-patches] FYI: BoxLayout rewrite
Date: Thu, 13 Oct 2005 20:15:09 +0000

Hi,

I once more rewrite the BoxLayout. This was inspired by my work on
OverlayLayout, and in fact the work very similar now. What's changed is
this:

- the BoxLayout now uses the SizeRequirements helper class all over the
place
- it caches the calculated layout and requirements information

This should greatly improve performance, and besides it clears up the
BoxLayout very much. Future bugs in BoxLayout are very likely really in
SizeRequirements, and fixing those would also mean to fix OverlayLayout
and javax.swing.text, both of which also use SizeRequirements. So what
we need is a testsuite for this SizeRequirement class in Mauve.

2005-10-13  Roman Kennke  <address@hidden>

        * javax/swing/BoxLayout.java
        (xChildren): New field.
        (yChildren): New field.
        (xTotal): New field.
        (yTotal): New field.
        (offsetsX): New field.
        (offsetsY): New field.
        (spansX): New field.
        (spansY): New field.
        (preferredLayoutSize): Rewritted to use cached values if
available.
        (minimumLayoutSize): Rewritted to use cached values if available.
        (maximumLayoutSize): Rewritted to use cached values if available.
        (layoutContainer): Rewritted to use cached values if available.
        (getAlignmentX): Implemented.
        (getAlignmentY): Implemented.
        (invalidateLayout): Clear the cache.
        (getSizeRequirements): Removed unneeded method. Replaced by
        checkRequirements().
        (checkTotalRequirements): New helper method.
        (checkRequirements): New helper method.
        (checkLayout): New helper method.

/Roman

Attachment: BoxLayout.diff
Description: Text Data


reply via email to

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