<Swing Dev> Regarding the fix for 6852592 (revalidate() must be smarter)

Christopher Deckers chrriis at gmail.com
Tue Aug 11 18:05:40 UTC 2009


Hi Anthony,

> Unfortunately we indeed found incompatibilities with our solution: a Swing
> regression test failed.

I expected such cases but then the question becomes whether old code
that does not follow the rule should fail in order to clean things up
for the future.

> Since subsequent evaluation of the issue naturally lays in the Swing area,
> the AWT team decided to redispatch the bug to the Swing team for further
> investigation. Please stay tuned for their resolution.

I hope the Swing team will make their evaluation very soon :)

> In the meantime the AWT team is going to update the specification of the
> Component and Container classes in order to:
>
> 1. Indicate the requirement introduced by the HW/LW Mixing feature (notably,
> the requirement of keeping the whole component hierarchy valid if the hw/lw
> mixing takes place).
>
> 2. Explicitly mark all the methods that invalidate the component hierarchy
> so that developers know when exactly they need to validate their component
> hierarchies.

As I mentioned in the past, the fact of having to know whether a
native component is part of the Swing hierarchy makes the whole HW/LW
mixing useless for most people (docking frameworks that add/remove
component hierarchies do not want to revalidate the hierarchy if they
know the layout has not changed passed a validate root, 3rd party
component providers do not want to educate their users and have their
forum loaded with questions about components not showing).

I mentioned a second approach to this issue: if revalidate cannot be
made smarter because of backward incompatibility, then invalidate
should simply raise an additional flag (isLWHWValid) that is set to
false up to the first validate root. Validate would clear that flag of
course, but at least the LWHW code would not rely on the hierarchy
validity but rather the LWHWValidity.

> I
> believe that a justified resolution for the issue will be concluded someday.

Well, in the meantime I have to keep the AWT LW/HW integration off and
use mine, but the fact that WebStart does not take into account the
system property is a showstopper (and some users are already
affected). Would it be possible to push that in the meantime?

Thanks a lot for the status update and keep up the good work!
-Christopher



More information about the swing-dev mailing list