Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [albireo-dev] size/layout management

Bruno Haible wrote:
Hi Gordon,

Since you added the font propagation code, I get this exception very often.
To reproduce, I only need to open the EmbeddedJTable view and close Eclipse.

Interesting. I can't map the line numbers in the stack trace to the code, but perhaps there is a problem with calling validate too early or too late in the AWT component's life cycle?

I can't reproduce the problem.


I'm no longer convinced that doing a validate() upon revalidate() was a
good idea. I think I added it initially because overriding validate() was
not sufficient. But now that we override validateTree(), not validate(),
this is hopefully sufficient.

I had concerns about calling validate from invalidate too.

Unfortunately, we already have an example that is affected by this change. If you open the "Relayout Example" view and click the "grow" button a few times, you'll see that the label gets truncated and the "..." characters are shown. Originally, the label would be properly resized, at least until the containing GridLayout ran out of space.

My RepaintManager implementation would take care of this problem. It simply hooks the addInvalidComponent() method and calls updateCachedAWTSizes. As you've correctly noted in the past, it is not a complete solution.

I propose that I add the RepaintManager hack as an optional feature.



Back to the top